Unable to get LocomotiveCMS-Search to work

326 views Asked by At

I am having multiple issues getting locomotivecms-search to run.

First one is that after I have added the locomotive-search gem and ran the install with the bundler which has installed the gem, I do not see any changes happening in the back-office. I do not see any options for making the pages searchable.

The second problem is tied with the Wagon which I use for development. I tried installing the gem locomotivecms-search-wagon, but without success.

Here is exactly what I have done in more details.

I have added the locomotive_search gem to the engine and ran bundle install without problems.

gem 'locomotivecms-search', '>= 0.3.5', require: 'locomotive/search/mongoid'

bundle install

As per instructions on the Documentation website (http://doc.locomotivecms.com/guides/search), I tried adding a gem for Wagon, however, it was not found.

gem 'locomotivecms-search-wagon', '~> 0.3.5'

bundle install

The bundler returned following output:

Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'locomotivecms-search-wagon (~> 0.3.5) ruby' in the gems available on this machine.

So, I proceeded. I added the search form which when submitted would send request to /?t=SEARCH_TERM

I created the indexes by running the rake db:mongoid:create_indexes

I then created a search page and made the contents of it resemble the code found at the bottom of this page: http://doc.locomotivecms.com/guides/search

When I tried to push the pages via bundle exec wagon push production -r pages I got the following error:

creating search{"template"=>["Liquid Syntax error ('Unknown tag 'search_for'' on '')"], "raw_template"=>["Liquid Syntax error ('Unknown tag 'search_for'' on '')"]}

I assume that this is happening because I could not install the locomotivecms-search-wagon gem, however, I do not know how to proceed, so I would appreciate all help.

1

There are 1 answers

0
hanov On

I had the similar problem. Try to set:

setParameter=textSearchEnabled=true

----> in mongodb.conf file mannually.