BooleanQuery
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   michael_saidak
Posted On:   Thursday, November 25, 2004 09:27 PM

I would like to make a boolean search with the following logical structure: (field1="abc")AND(field2="xyz") Without the boolean condition I do: Query query = QueryParser.parse("abc", field1, analyzer); Hits hits = searcher.search(query); which works fine, but how do I now combine this with the other condition? Should I now construct something like Query query2 = QueryParser.parse("xyz", field2, analyzer); and combine the two (& if yes how?) ?    More>>

I would like to make a boolean search with the following logical structure:



(field1="abc")AND(field2="xyz")



Without the boolean condition I do:


Query query = QueryParser.parse("abc", field1, analyzer);

Hits hits = searcher.search(query);




which works fine, but how do I now combine this with the other condition? Should I now construct something like

Query query2 = QueryParser.parse("xyz", field2, analyzer);

and combine the two (& if yes how?) ?

   <<Less

Re: BooleanQuery

Posted By:   Otis_Gospodnetic  
Posted On:   Saturday, November 27, 2004 11:26 PM

About | Sitemap | Contact