One small correction...

My default Analyzer is snowball analyzer and it is being used for all fields 
(not KeywordAnalyzer) even though few fields should use different analyzer.  
PerFieldAnalyzerWrapper is not considering the analyzer set for different 
fields. 

This is consistently reproducing when the index is upgraded from 2.4.1 to 2.9.1

Regards
Ganesh 


----- Original Message ----- 
From: "Ganesh" <emailg...@yahoo.co.in>
To: <java-user@lucene.apache.org>
Sent: Monday, November 30, 2009 10:14 AM
Subject: PerFieldAnalyzerWrapper


Hello all,

I am having an index build using v2.4.1. I upgraded to 2,9.1. The index was 
searchable. I added couple of documents and i found that the 
PerFieldAnalyzerWrapper is not working as expected. 

PerFieldAnalyzerWrapper analyzer = new PerFieldAnalyzerWrapper(getAnalyser());
analyzer.addAnalyzer("FROM",         new EmailAnalyzer());
analyzer.addAnalyzer("TO_INDEX", new EmailAnalyzer());
analyzer.addAnalyzer("TO",               new KeywordAnalyzer());

After indexing i found that the FROM and TO_INDEX fields are indexed using 
KeywordAnalyzer and not by  EmailAnalyzer. I even added logs in the tokenStream 
function of EmailAnalyzer and it never hit. Rebuilding the index works good.

I faced this issue rarely in v2.4.1 itself.  Rebuilding the index works good.

This issue happens when document is added to the existing index. 

Please guide me to overcome this issue.

Regards
Ganesh
Send instant messages to your online friends http://in.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Send instant messages to your online friends http://in.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to