Hi Experts,

I need to get the Token as String from TokenStream for some further processing.
I have similar code as below.
Can somebody please help me, how I can get the Token as String[termText] in 
below code?

ArrayList<String> hotTokens = new ArrayList();
TokenStream stream = analyzer.tokenStream(field, new StringReader(query));

while (stream.incrementToken()) {
      String termText = //Extract the Term from the stream. Need Help here, how 
to extract it.

Please let me know, if needed any further information from my side.

Thanks In Advance.


Reply via email to