Hi,

I have a TokenStream that inserts synonym tokens into the stream when matched. One thing I am wondering about is what is the effect of the startOffset and endOffset. I have something like this:

Token synonymToken = new Token(originalToken.startOffset(), originalToken.endOffset(), "SYNONYM");
synonymToken.setPositionIncrement(0);

What I am wondering is if I set the startOffset and endOffset to 0 and the endOffset to the length of the synonym string what effect will this have?

eg
Token synonymToken = new Token(0, repTok.endOffset(), "SYNONYM");
synonymToken.setPositionIncrement(0);

Thanks

Reply via email to