> On Nov 6, 2014, at 3:13 PM, [email protected] wrote:
> 
> Are you suggesting that DefaultIndexingChain.PerField.invert(boolean 
> firstValue) would, prior to calling reset(), call 
> setPositionIncrement(Integer.MAX_VALUE), but only when ‘firstValue’ is false? 
>  Hmmmm.  I guess that would work, although it seems a bit hacky and it’s 
> tying this to a specific attribute when ideally we notify the chain as a 
> whole what’s going on.  But it doesn’t require any new API, save for some 
> javadocs.  And it’s extremely unlikely there would be a 
> backwards-incompatible problem, so that’s good.  And I find this use is 
> related to positions so it’s not so bad to abuse the position increment for 
> this.  Nice idea Steve; this works for me.

Um, I meant something much simpler (but wrong): use the existing 
Analyzer.getPositionIncrementGap() to allow analysis components to infer 
whether a value was first.  I can see now from 
DefaultIndexingChain.PerField.invert(), though, that this info isn’t available 
to analysis components, but is only used to adjust the FieldInvertState’s 
position.  Sorry for the noise.

Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to