Hi!
If a document with an unique id is added again, the new document is
added by deleting/marking the older doc as deleted. So when a search is
made with an IndexReader obtained from the IndexWriter (for NRT) both
the docs show up, the older doc and the newer updated doc. To prevent
the older doc from showing up, maxBufferedDeleteTerms can be set to 1,
which prevents the older doc in the search results. But there seems to
be a problem, if a field is changed and then the doc updated, the new
field content becomes searchable immediately but the content seen on the
search page is the old content ie. q=afield:new content works but the
content seen on the results pages is <afield>old content</afield>.
Is there a better way then using maxBufferedDeleteTerms to remove the
deleted old docs from IndexWriter RAM ?
Is there a way to refresh the contents of a search on the results page
with the new content ?
maxBufferedDeleteTerms also seems to be term specific and not generic
across terms ie. its value is for each individual term and not across
all the terms. Is this the way this is designed to work ?
BTW, a commit deletes the older docs and the new doc shows up in
searches with the right content after the commit.
Regards,
- Nagendra Nagarajayya
http://solr-ra.tgels.org
http://rankingalgorithm.tgels.org