lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Indexing multiple instances of the same field for each document
Date Fri, 27 Feb 2004 16:27:24 GMT
Roy Klein wrote:
> E.g.
>    doc1.add(Field.indexed("field","the");
>    doc1.add(Field.indexed("field","quick");
>    doc1.add(Field.indexed("field","brown");
>    doc1.add(Field.indexed("field","fox");
>    doc1.add(Field.indexed("field","jumped");
>    writer.addDocument(doc1);
> Vs.
>    doc2.add(Field.indexed("field","the quick brown fox jumped");
>    writer.addDocument(doc2);
> Is there a difference in query performance when I query on fields that
> have been added multiple times vs fields which were added with the
> entire field contents at once?


> Also FYI, I found that phrase queries don't work against a field that's
> been added multiple times. If I query the phrase "brown fox", against
> the two example docs above, only the second matches.

They should work the same.  I'm not sure what Field.indexed does. 
That's not a normal Lucene method.


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

View raw message