<<What *would* be tricky is phrase queries since inserting a new term breaks the offsets AFAIK.>>
I thought that that's the point in the Synonym injection example, setting Term.setPositionIncrement(0) for the injected token(s). That way. phrase queries work since all of the injected tokens share the same offset.... But I've been wrong before. Erick On 5/16/07, Daniel Noll <[EMAIL PROTECTED]> wrote:
On Wednesday 16 May 2007 23:50:55 Erick Erickson wrote: > That's interesting. I suppose you could add the "synonym" of > WildAnimals$ whenever you encountered any of the items in your > list, then when concept searching is called for, search on > WildAnimals$. > > Highlighting might be tricky, but certainly do-able, especially with > the capabilities of a MemoryIndex...... I'm not even convinced it would be tricky. I'm fairly sure that if the token stream returns two terms over the same span, that they would have the same start offset and end offset and highlight identically. What *would* be tricky is phrase queries since inserting a new term breaks the offsets AFAIK. Although, I suppose you could always store the concepts in a different field and not modify the analyser being used for the text itself. Daniel -- Daniel Noll Nuix Pty Ltd Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699 Web: http://nuix.com/ Fax: +61 2 9212 6902 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]