FAQ
Perhaps I misunderstood something, but how do you update a document?

I mean, if a document contains vol:a, vol:b and vol:c and then you want to
add vol:d to it, don't you remove the document and add it back?

If that's what you do, then you can also update the numvols field, right?

Or .. you mean you already have an index w/ all those documents indexed, and
you want to search it now? If you cannot rebuild it, may I suggest the
following - created another index and add documents to it in the same order
as they were added to the current index. To each document add a 'numvols'
field. Then use a ParallelReader to search over the two indices in parallel
with the query I gave before. The two indices should look like this:

Index 1 Index 2
------------------- ------------------------
Doc: vol1, vol2, vol3 Doc: numvols:3
Doc: vol1, vol4, vol6, vol7 Doc: numvols: 4
Doc: vol5 Doc: numvols: 1
Doc: vol3, vol8 Doc: numvols: 2

It should work if your index doesn't have deletes. If it has, consider
optimizing it or call expungeDeletes.

If your scenario is different, then perhaps try to explain it more
accurately.

Shai
On Wed, Jul 22, 2009 at 11:47 AM, ba3 wrote:

Maybe add to each doc a field numVolunteers and then constraint the
query
to
vol:krish and vol:raj and numvol:2 (something like that)?
Thanks for the reply. But.,
The number of documents run into few thousands. Hence editing them is not
an
option.
Is there any other ways to solve this scenario.

-- Rgds
Ba3
--
View this message in context:
http://www.nabble.com/Exclusion-search-tp24600949p24602308.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 9 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedJul 22, '09 at 6:49a
activeJul 24, '09 at 6:21a
posts9
users5
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase