Indexing the multiple words at the same position

2010-08-06 Thread Jeroen Lauwers
Has anyone encountered the following problem (and found a solution) I need to index a classical text that can have multiple words at that same position. Example: if a publisher isn't sure if Shakespeare wrote "To be or not to be happy" or "To be or not to be daddy", he will put the 'best' word (

RE: Indexing the multiple words at the same position

2010-08-06 Thread Daniele Fusi
Hi, it also depends on the complexity of your critical apparatus, but you could just use a custom analyzer which injects "synonyms" (here variants) of your tokens in THE SAME POSITION as the original word. This way a search will match both "daddy" and "happy". -Original Message- From: Jero

RE: Indexing the multiple words at the same position

2010-08-06 Thread Jeroen Lauwers
Hi, Daniele That's it! You put me on the right track! I found the answer in "http://www.codeproject.com/KB/cs/lucene_custom_analyzer.aspx"; where they talk about a "Custom Synonym Analyzer". The final clue was "Token.SetPositionIncrement(0)". I never realized it was as simple as manipulating th