You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jerónimo López Bezanilla <jl...@bassy.net> on 2005/03/15 16:53:17 UTC

Search in appendable fields

I want to index articles:
My document is:
- Title
- Authors

There are one or more authors, and I index the field with "Appendable 
Fields" (page 68, Lucene in action).

Document doc = new Document();
doc.add(Field.Text("Title", title));
doc.add(Field.Text("Author", author1));
doc.add(Field.Text("Author", author2));

For example I have this documents:

Title: "Lucene in Action"
Author1: "ERIK HATCHER"
Author2: "OTIS GOSPODNETIC"

Title: "Lucene in 21 days"
Author1: "OTIS HATCHER"
Author2: "LOPEZ JESUS"

And the problem is that if I search by the author "OTIS HATCHER" y get 
both documents as a hit, but only the second one is valid.
How can i force that all words of "OTIS HATCHER" must appear in the same 
field?


Thanks
Jerolba




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