lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject RE: setPositionIncrement questions
Date Fri, 16 May 2008 22:24:41 GMT

: I ended up hacking StandardTokenizer::next() to check for $^$^$, and if it
: is there then set the current Token PositionIncrement to 500 and resume the

from what i remember of your use case, it probably would have been a lot 
easier to just add each paragraph as a seperate field instance (and rely 
on IndexWriter to call yourAnalyzer.getPositionIncrementGap() where you 
would return 500) then to inject magic tokens and make your analyzer treat 
them special -- but if you've already done it, you've already done it.

: tokenizing loop (so the word which will be read into that Term will have
: position increment of 500). As far as I can tell it is working well - how
: can I check the terms positions in a document's field and see they have been
: incremented indeed? I have tried Luke, but it doesn't seem to allow this. My
: field is tokenized and not stored.

you could trust that it works :) ... or you could query for a phrase that 
shouldn't work untill you increase teh slop to 500 ... or you could use 
something like IndexReader.termPositions to iterate over all the terms and 
see where they are.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message