You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Nagendra Nagarajayya <nn...@transaxtions.com> on 2011/07/18 03:02:23 UTC

Deleted docs in IndexWriter Cache (NRT related)

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


Re: Deleted docs in IndexWriter Cache (NRT related)

Posted by Grijesh <pi...@gmail.com>.
optimize ensures that deleted docs and terms will not be displayed.

-----
Thanx: 
Grijesh 
www.gettinhahead.co.in 
--
View this message in context: http://lucene.472066.n3.nabble.com/Deleted-docs-in-IndexWriter-Cache-NRT-related-tp3177877p3178670.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Deleted docs in IndexWriter Cache (NRT related)

Posted by Nagendra Nagarajayya <nn...@transaxtions.com>.
Thanks Pravesh! But this is NRT related so commit is not called to 
update a document. The documents added are available for searches 
immediately after update and commit is not needed. A commit may be 
scheduled once in about 15 mins or as needed.

Regards,

- Nagendra Nagarajayya
http://solr-ra.tgels.org  <http://solr-ra.tgels.com>
http://rankingalgorithm.tgels.org  <http://rankingalgorithm.tgels.com>



On 7/17/2011 10:12 PM, pravesh wrote:
> commit would be the safest way for making sure the deleted content doesn't
> show up.
>
> Thanx
> Pravesh
>
> --
> View this message in context:http://lucene.472066.n3.nabble.com/Deleted-docs-in-IndexWriter-Cache-NRT-related-tp3177877p3178179.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


Re: Deleted docs in IndexWriter Cache (NRT related)

Posted by pravesh <su...@yahoo.com>.
commit would be the safest way for making sure the deleted content doesn't
show up.

Thanx
Pravesh

--
View this message in context: http://lucene.472066.n3.nabble.com/Deleted-docs-in-IndexWriter-Cache-NRT-related-tp3177877p3178179.html
Sent from the Solr - User mailing list archive at Nabble.com.