RE: How to implement a GivenCharFilter using incrementToken

2009-11-25 Thread KingShooter
The example you have given is invalid, as offsets should always refer to the original position in the source stream, so should be: a(0,1,1) b(2,3,1) a(6,7,1) c(11,12,1). Deng: I'm afraid that if (case1) index "axxxb", and then I search "axb" or (case2) index "axb" and then search "ab", which

How to implement a GivenCharFilter using incrementToken

2009-11-24 Thread KingShooter
Hi, I find it is very hard to implement a GivenCharFilter(extends TokenFilter)using incrementToken. My requirment is like this: I want to analyze a StringReader("axb xxa xx c") to these token[term(startOffset, endOffset, posIncre)]: a(0,1,1) b(2,3,1) a(4,5,1) c(6,7,1). First I use a WhiteS