Sunspot. Solr not searching any changes (create/update)

Alexander Shlenchack

I'm using sunspot_rails '~> 2.2' (Solr 5.3.1 1703449). When I create/update models I cannot find new changes and Solr admin panel for the target core doesn't show changes in Last Modified. But if I restart Solr directly I will be able to find by new changes and field Last Modified will also change.

How to fix it?

p4sh4

From the readme:

If you make a change to the object's "schema" (code in the searchable block), you must reindex all objects so the changes are reflected in Solr:

bundle exec rake sunspot:solr:reindex

Also, according to this and this, Sunspot.commit which updates the Solr index is not automatically called if you're updating a model outside of a Rails request (for example, from the Rails console). You can manually call Sunspot.commit from the console to commit the changes to Solr.

Exectuting bundle exec rake sunspot:solr:reindex will also commit your changes.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Error searching multiple models with Sunspot Solr Rails 3

From Dev

Sunspot Solr Gem & .gitignore

From Dev

Search solr and sunspot

From Dev

Sunspot and Nutch with Solr

From Dev

Sunspot solr rake issue

From Dev

Sunspot / Solr on production server

From Dev

SOLR - sunspot_rails/sunspot_solr 2.1 - NO JSP support

From Dev

Sunspot solr NO JSP connection error

From Dev

Group by stats in Solr using Sunspot

From Dev

sunspot solr search by multiple terms

From Dev

rails sunspot solr search by keywords

From Dev

Configure Sunspot Solr search with scope

From Dev

Multi-value spatial search with Sunspot Solr

From Dev

solr, sunspot, bad request, illegal character

From Dev

Search for empty string field in Sunspot (Solr)

From Dev

How to join a model in solr with rails sunspot

From Dev

Solr Sunspot - Reindexing objects is not automatically running

From Dev

rake sunspot:solr:start throwing an error

From Dev

Sunspot solr, fetch only a limited number of records?

From Dev

Using sunspot_solr search array of values

From Dev

Multi-value spatial search with Sunspot Solr

From Dev

Boost listings with photos using Sunspot Solr

From Dev

How to use will_paginate with Sunspot Solr

From Dev

Rails: Sunspot text searching with model associations, using :through

From Dev

Highlighting a field from an owned object with sunspot_solr

From Dev

rails 4 rspec sunspot solr tests fail intermittently

From Dev

How to search in has_many association using Sunspot/Solr?

From Dev

Remove Sunspot's fq parameter from Solr query

From Dev

Rails Sunspot solr search returns multiple entries of the same record