lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Adding a new search field but needs searching for all
Date Wed, 10 May 2006 14:59:05 GMT
Try a MatchAllDocsQuery combined in a BooleanQuery with a negative  
clause for b == 1.

	Erik


On May 10, 2006, at 5:32 AM, Chun Wei Ho wrote:

> I have a large Lucene index that I am planning on adding one or more
> search fields, and perform searches on them.
>
> How do I include results from the other documents that do not have the
> new field? For example, I have 10 million documents in a index, and I
> update 200 of them adding the field "b" = 1, 100 of them with field
> "b" = 2. How do I write a query such that I can specify "b" != 1 and
> get 10million minus 100 (including the ones that do not have the field
> "b"). Or do I have to update all the documents (potentially time
> consuming since it means deleting and inserting each document in
> turn??)?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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


Mime
View raw message