0

I have app sending update request to solr, but the commit option is handled in solrconfig.xml and the auto commit is to 15000 MS . Now problem is the Num Docs in UI page is not updating and even if i give search request none of the documents are visible could anyone let me know how to check whether my autocommit is working or not.

Once i restart the solr the number of documents will be reflected and i will be able to search. Will the ideal case be the same everytime do we need a solr service restart for autocommit to get effect ?

Thanks

Adarsh H D Dev
  • 588
  • 7
  • 29
  • How do you send the update requests? – ilinca Mar 03 '16 at 10:20
  • Through SolrJ client – Adarsh H D Dev Mar 03 '16 at 10:29
  • 1
    Do you commit the documents? i.e. both: solr.addBeans(yourBeans); solr.commit(); – ilinca Mar 03 '16 at 11:26
  • No commit Just solr.addbeans() the commit is taken care by solr Autocommit feature. – Adarsh H D Dev Mar 03 '16 at 11:44
  • I suppose you don't have openSearcher set to false? – ilinca Mar 03 '16 at 13:49
  • Yup i have set opensearcher to false , what will happen if i have set it false ? but for committing the index we don't require open searcher as true right, i thought openSearcher is used for making the index available for searching. Correct me if am wrong – Adarsh H D Dev Mar 04 '16 at 05:54
  • 1
    You are right, you don't need to open a new searcher in order to commit, but you do need to open one to search the docs. In the admin panel, choose your core from the dropdown -> Plugins -> Core -> Searcher and check how many documents show once you've issued a commit, and not opened a new searcher and after opening a new searhcer. – Binoy Dalal Mar 04 '16 at 06:04
  • I have one more doubt if am passing the Solr.addbeans() & Solr.Commit() together through the SolrJ client. the return status which is returned is it after the commit or before the commit. ? – Adarsh H D Dev Mar 04 '16 at 10:56
  • 1
    I think showing the number of docs in the interface still requires some kind of search. See the accepted reply here http://stackoverflow.com/questions/22293812/solrj-and-auto-commit . Does that help? – ilinca Mar 04 '16 at 12:01
  • Thanks it was helpful. – Adarsh H D Dev Mar 04 '16 at 15:28

1 Answers1

0

You need to set the soft commit in your solrconfig.xml file. This makes the added documents available to search. Soft commits are light weight, set it to 2000 milliseconds.

whomer
  • 575
  • 9
  • 21