I think you need to use 2 separate fields here? (one for n=1 and one for n=2)

You just cant really have "correct positions" for n=1 and n=2, its not possible.

On Sun, Apr 20, 2014 at 1:01 PM, Shawn Heisey <[email protected]> wrote:
> On 4/20/2014 5:21 AM, Robert Muir wrote:
>> There is no bug here. the positions are correct.
>>
>> If you want to use phrase queries, i wouldnt try to be so tricky with 
>> n-grams.
>>
>> This never works well, and there is nothing to fix...
>
> OK, if it's not a bug, would it be reasonable at all to have a config
> option that preserves positions for all unigrams?
>
> The customer (a Japanese company) wants to be able to search for single
> characters, but they do not want to have single-character "words" match
> when they put in longer strings.  This means that outputUnigrams needs
> to be there on the index analysis, but not the query analysis.  This
> combination breaks phrase queries.  The config option I just mentioned
> would fix this.  Although it's possible it might break something else,
> off the top of my head I can't think of any examples.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to