Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Solr search and indexing files


Reply


26 Posts   3840 Views

Avatar
BlueO

Community Member, 52 Posts

27 March 2012 at 5:23pm

Hmm, Ok, I've got the new changes and removed all my previous stuff from _config.php. Added a 'Entry' configuration type (with default values for the fields) via the admin area, saved it, but then hit 'reindex' or visit /dev/tasks/SolrReindexTask but still only get 16 Objects indexed (my pages) the 140 something data objects are ignored. Also the search on fields list doesn't appear to have Entry's fields....

I'm using Ubuntu's solr package and don't see any obvious errors in the log but I'm not really sure what to look for in there but here's a sample

INFO: Closing Searcher@1ae717f main
fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
27/03/2012 5:18:44 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
27/03/2012 5:18:44 PM org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {optimize=} 0 17
27/03/2012 5:18:44 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/update params={wt=json} status=0 QTime=17

Avatar
Marcus

Administrator, 87 Posts

27 March 2012 at 5:37pm

Hur, I forgot to commit changes to the reindex task :D I've just updated so that it actually obeys the type you specify when doing dev/tasks/SolrReindexTask?type=Entry

https://github.com/nyeholt/silverstripe-solr/commit/47853510cd516af775a375d256d55bb30fe70068

should work a little better :)

Avatar
BlueO

Community Member, 52 Posts

28 March 2012 at 11:01am

Cool so now i'm getting the right stuff (eg all my dataobject fields) in 'search on times' and 'Search on Fields' but still the reindex task doesn't pick the dataobject items up, only pages. Is this to do with the index on write or should the reindex task pick up all the existing objects too?

Attached Files
Avatar
Marcus

Administrator, 87 Posts

28 March 2012 at 11:12am

Did you get the latest update?

Assuming you have the ?type=Entry parameter, the reindex task should output a bunch of information like "Reindexed Entry (#3)"

Avatar
BlueO

Community Member, 52 Posts

28 March 2012 at 11:16am

Ahha! Great, that did the trick - all go.

Thanks so much for your help it was brilliant.

Bernard

Avatar
Chris Dangerfield

Community Member, 8 Posts

14 March 2013 at 10:52am

Hi Marcus and BlueO,

Thanks for all the info in your post. I am at a similar point. My dataobjects seem to be indexing all right (using the ?type=Entry) but they are still not showing up in the search. Any ideas?

Thanks heaps,

Chris

Avatar
Marcus

Administrator, 87 Posts

14 March 2013 at 11:23am

First thing is to double check that they're in the index - best way to do this is to go to the solr admin app (typically something like http://localhost:8983/solr/) and execute a match everything query - *:*

If that's coming up as expected - how are you searching for the data objects? If you're using the SolrSearchPage, make sure you have the data object type selected in the 'search on types' field.

Avatar
Chris Dangerfield

Community Member, 8 Posts

14 March 2013 at 3:58pm

Hi Marcus,

Thanks for that. The items are coming up ok in Solr Admin - so I was having a look at the Solr Search Page, and I couldn't find DataObject in the "Search items of type" field - is that where I should be looking?

Thanks,

Chris