using lucene 1.3-final, it appears to only search the first field with that name. here's the code i'm using to construct the index, and I'm using Luke to check that the index is created correctly. Everything looks fine, but my search returns empty. do i have to use a special query to work with multivalue fields? is there a testcase in the source that performs this kind of work that I could look at?
//indexing Document doc = new Document(); Iterator values = myValues.iterator(); while (values.hasNext()) { Object value = values.next(); doc.add(Field.Keyword("test", value.toString())); } //searching BooleanQuery query = new BooleanQuery(); Query fieldQuery = QueryParser.parse("searchValue", "test", ANALYZER); query.add(fieldQuery, true, false); Ryan > -----Original Message----- > From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 11, 2004 11:31 AM > To: Lucene Users List > Subject: Re: multivalue fields > > > Just add multiple Fields with the exact same name. > > Otis > > --- Ryan Sonnek <[EMAIL PROTECTED]> wrote: > > How can I construct a document that has multiple values for > one field > > (ex: locale en_US, de_DE, etc). I've been concatonating the values > > into one string and storing them in one field, but I think this > > affects the search rankings (more text to search produces lower > > score). is it possible to append the seperate values to the same > > field without concatonating them together? > > > > Ryan > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]