lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <>
Subject Re: index and search question
Date Mon, 21 Jun 2004 04:04:48 GMT
On Sun, Jun 20, 2004 at 09:46:42AM +0000, Dmitrii PapaGeorgio wrote:
> Let's say I index documents using this
>      Document doc = new Document();
>      doc.add(Field.Text("file1", (Reader) new InputStreamReader(is)));
>      doc.add(Field.Text("file2", (Reader) new InputStreamReader(is2)));
> And want to do a search like this
> file1:Word file2:Word2
> Basically doing a search using mutiple segments, file1 and file2 in the 
> same query, how would this be possible?

Just as you wrote. If you use the QueryParser, you can search with

file1:Word file2:Word2              or e.g.
+file1:Word +file2:Word2            etc.

Or you can build a boolean query programmatically (if I understood
your question).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message