Re: Analyzer.getPositionIncrementGap question

2006-10-26 Thread Erick Erickson
See the SynonymFilter in LIA for how to create your very own analyzer that gives you total control over the increment between terms. Essentially, that allows you to set the position increment for each and every token. I suspect that this would be easier, but what do I know? The difference is

Re: Analyzer.getPositionIncrementGap question

2006-10-26 Thread qaz zaq
Thanks Erick, Since value1, value2, value3, itself can also include multiply tokens, I am not sure the token based postion increment, d.add(new Field(value1 value2 value3), will actually work. I was trying to use getPositionIncrementGap, but there appears to no way to set non constant

Re: Analyzer.getPositionIncrementGap question

2006-10-26 Thread Erick Erickson
OK, how about injecting a special token in your input stream, then having your analyzer record that token and set the position increment of the next real token? Something like d.add(field, veryspecialtokenincrementnext100 value1...); d.add(field, veryspecialtokenincrementnext10 value2...);

Re: Analyzer.getPositionIncrementGap question

2006-10-26 Thread Chris Hostetter
: getPositionIncrementGap, but there appears to no way to set non : constant gap. say, gap between value1 and value2 is 10, but gap : between value2 and value3 is 100. by default, non of hte analyzers do anything special in getPositionIncrementGap -- that's up to you to control in any subclass

Analyzer.getPositionIncrementGap question

2006-10-25 Thread qaz zaq
I have multiple values want to add to the same FIELD, and I also want to add non-zero but NON CONSTANT position increment gap among those values. e.g., gap between value1 and value2 is 10, but gap between value2 and value3 is 100. is there any how can I achieve that? d.add(new Field