I have a couple of fields like this (e.g., a given case can have 1:many case numbers and 1:many defendant aliases). So there's no problem with adding the same field n times to a given document? If so, that's perfect and i'll add it to the faq. I was concatenating before and getting false matches.
________________________________ From: Chris Hostetter [mailto:[EMAIL PROTECTED] Sent: Sun 8/13/2006 12:28 PM To: java-user@lucene.apache.org Subject: Re: Repeatable field names : subtitle. Can I simple add both fields with a field name title (this : seems to work fine), or is it a better approach (for example more : efficient) to concatenate both title and subtitle first and add them as : a single field to the index? there's no reason to concatenate them unless you want to *store* them as one long string (so you get the value back as a single string instead of an array of two strings) ... i'm guessing you don't. from a search perspective the only difference is that with two values the positionIncrimentGap method of your analyzer will be called, putting a "gap" between the last word of hte title and the first word of hte subtitle ... this can be usefull if you want to make sure that phrase searches don't falsly match one word in the title and one word in the subtitle. -Hoss --------------------------------------------------------------------- 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]