lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Looking for an example of Using Position Increment Gap
Date Tue, 11 Mar 2008 00:01:18 GMT

: the analysis section.  (Basically writing a custom analyzer that introduces a
: position increment gap between phrases)  I am however curious if an example of
: a usage like that exists somewhere that I could use as a basis for the
: analyzer that I'm going to have to write to handle this case.

Bear in mind, when people talk about "position increment GAP" they are 
usually refering explicitly to the method 
Analyzer.getPositionIncrementGap(String) .. which is what gets called when 
a Document is being analyzed and it contains two or more instances of 
"Field" that have hte same field name.

what you are asking about sounds more like the more basic "position 
increment" ... which defaults to "1" for each Token and can be changed by 
calling Token.setPositionIncrement(int).  a quick krugle search can find 
you lots of examples of using this method...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message