lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Rowe <sar...@gmail.com>
Subject Re: Multi-valued fields and TokenStream
Date Thu, 06 Nov 2014 23:55:54 GMT

> On Nov 6, 2014, at 3:13 PM, david.w.smiley@gmail.com 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message