Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Solr search and indexing files

Discuss all other Modules here.

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

Page: 1 2 3 4
Go to End
Author Topic: 3497 Views
  • BlueO
    Avatar
    Community Member
    52 Posts

    Re: Solr search and indexing files Link to this post

    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

  • Marcus
    Avatar
    Administrator
    86 Posts

    Re: Solr search and indexing files Link to this post

    Hur, I forgot to commit changes to the reindex task 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

  • BlueO
    Avatar
    Community Member
    52 Posts

    Re: Solr search and indexing files Link to this post

    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
  • Marcus
    Avatar
    Administrator
    86 Posts

    Re: Solr search and indexing files Link to this post

    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)"

  • BlueO
    Avatar
    Community Member
    52 Posts

    Re: Solr search and indexing files Link to this post

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

    Thanks so much for your help it was brilliant.

    Bernard

  • Chris Dangerfield
    Avatar
    Community Member
    8 Posts

    Re: Solr search and indexing files Link to this post

    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

  • Marcus
    Avatar
    Administrator
    86 Posts

    Re: Solr search and indexing files Link to this post

    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.

  • Chris Dangerfield
    Avatar
    Community Member
    8 Posts

    Re: Solr search and indexing files Link to this post

    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

    3497 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.