adamcooke / documentation-elasticsearch

An Elasticsearch module for Documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Elasticsearch

This is a module for Documentation which replaces the searcher searcher with one powered by Elasticsearch.

Installation

Add the gem to your Gemfile and run bundle.

gem 'documentation-elasticsearch', '~> 1.0'

Once installed, you should add an initializer to your Rails application to add configuration.

require 'documentation/searchers/elasticsearch'
Documentation.config.searcher = Documentation::Searchers::Elasticsearch.new(:host => 'localhost')

Setup

Once installed, you'll probably want to index all your documents.

# Remove any existing index
Documentation.config.searcher.reset
# Index all pages
Documentation::Page.all.each(&:index)

About

An Elasticsearch module for Documentation

License:MIT License


Languages

Language:Ruby 100.0%