Java Mailing List Archive

http://www.java2.5341.com/

Home » java-user.lucene »

Fields with the same name

Rafael C. de Almeida

2008-10-15

Replies: Find Java Web Hosting

Author LoginPost Reply
I didn't quite understand the Document documentation so well, the
documentation says:

"Adds a field to a document. Several fields may be added with the same
name. In this case, if the fields are indexed, their text is treated
as though appended for the purposes of search."

Would

  doc.add(new Field("foo",
                   "bar1" + "bar2",
                   Field.Store.YES,
                   Field.Index.ANALYZED));

be different in any way than

  doc.add(new Field("foo",
                   "bar1",
                   Field.Store.YES,
                   Field.Index.ANALYZED));
  doc.add(new Field("foo",
                   "bar2",
                   Field.Store.YES,
                   Field.Index.ANALYZED));
?

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@(protected)
For additional commands, e-mail: java-user-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.