lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditi Goyal" <aditi...@gmail.com>
Subject Searching across multiple fields
Date Mon, 17 Nov 2008 12:58:29 GMT
Hi,

Lets say I have an index with the following fields:
field1, field2, field3 and field4 where all the fields can have same values.

Now I want to search a document where "basket" and "apple" are part of the
whole document but "orange" is not.

I have tried using MultiFieldQueryParser but it is not showing correct
results.

I typed the command ("basket" AND "apple") NOT "orange" for the
MultiFieldQueryParser

query = lucene.MultiFieldQueryParser.parse(command, fields, shoulds,
analyzer )
hits = self.searcher.search(query)


Am I doing something wrong? Please help.

Thanks,
Aditi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message