Thanks Ahmet.It worked.
As per your suggestion i have changed the code as below.
final String term=charTermAttr.toString();
final String convertedTerm = Converter.convert(term);
charTermAttr.setEmpty().append(convertedTerm);
return true;
now for the input stream "term1 part 2 ass
Hi Simitha,
Please try below :
final String term = charTermAttr.toString();
final String s = convertedTerm = Converter.convert(term);
// If not changed, don't waste the time adjusting the token.if ((s !=
null) && !s.equals(term))
charTermAttr.setEmpty().append(s);
Ah
Hi
I have a requirement such that while indexing if tokens contains numbers,
it needs to be converted into corresponding words.
e.g : term1 part 2 assignments -> termone part two assignments.
I have created a custom filter with following code:
@Override
public boolean incrementToken() throws IO