lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <emailg...@yahoo.co.in>
Subject Re: PerFieldAnalyzerWrapper
Date Mon, 30 Nov 2009 05:39:28 GMT
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" <emailgane@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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Send instant messages to your online friends http://in.messenger.yahoo.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