lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Falakh TE <mfal...@gmail.com>
Subject Re: Lucene 4.0 tokenstream logic
Date Thu, 10 Jul 2014 05:10:37 GMT
Hi,


I have the same problem


for(String str2:split)
		{
				TokenStream	stream = analyzer.tokenStream("field", new
StringReader(str2));		
					 
			        CharTermAttribute termAtt =
stream.addAttribute(CharTermAttribute.class);
				
				    stream.reset(); 
				   						
							while (stream.incrementToken()) {
							 str=termAtt.toString().toCharArray();
																					
							    System.out.println(termAtt.toString());
							  }
						
							 stream.end(); 
                  }

The out put only prints tokens of first element in the string array ...

I am first in here, so please help me to get tokens of each element in the
string array 






--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-4-0-tokenstream-logic-tp4077203p4146458.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
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