cancel
Showing results for 
Search instead for 
Did you mean: 

How to use another Lucene's Analyser (eg : French Analyser)

sam69
Champ in-the-making
Champ in-the-making
Hello !

I am evaluating Alfresco, and I found that the search engine has poor results when searching for french documents.
For exemple, searching for a document which contain the word "l'accent" with the keyword "accent" (without the article) does'nt fetch any results. Of course, when I try with "l'accent" I got my document.

So I investigate a little, and I found that it was possible to change the lucene analyser, and there was different possible analyser inluding a french analyser.

So is it possible to change the default alfresco analyser ? Just a parameter or I need to change the code ?

Thanks in advance for your response !

Samuel
3 REPLIES 3

akinori
Champ in-the-making
Champ in-the-making
Hi

I'm also trying to use alternative Analyzer (JapaneseAnalyzer and CJKAnalyzer).

1. Copy jar files of those Analyzer (in fact, we need some other works for Japanese one, such as setting System Property. I did it anyway)
2. Create dataTypeAnalyzers_ja_JP (for testing purpose, I replaced all standard.StandarAnalyzer with ja.JapaneseAnlyzer in that file)
3. Restart Alfresco and import/create documents.

But I couldn't find any document with Japanese keywords. English words worked for the same documents. (for filename and some metadata, Japanese query is working actually)

I saw someone reported similar issue for Chinese and they seemed to succeed to make index with Chinese charactors finally, in topic "chinese document". But so far I haven't done it for my case (Japanese).

sam69
Champ in-the-making
Champ in-the-making
Thanks for your response akinori !
I did what you say, and more exactly :

- copyFrenchAnalyzer.class, FrenchStemFilter.class, FrenchStemmer.class into the lucene.jar (more precisely in org\apache\lucene\analysis\fr)
(I know this method is not really good, I should create a new jar or someting…)

- copy the lucene.jar which include the FrenchAnalyser) in :
\alfresco\WEB-INF\lib

- create dataTypeAnalyzers_fr_FR.properties from the dataTypeAnalyzers.properties in
alfresco\WEB-INF\classes\alfresco\model
and replace standard.StandarAnalyzer by fr.FrenchAnlyzer where it's appropriate.

- restart Alfresco and import/create documents.

The French Analyser seems to be used but, when I test the full-text search, it's look like it's still the DefaultAnalyser…

I hope that you will manage to make alfresco work with the Japanese Analyser !

PS : this thread continue at : http://www.alfresco.org/forums/viewtopic.php?t=150&postdays=0&postorder=asc&start=45

akinori
Champ in-the-making
Champ in-the-making
Thank you Sam69

You seem to be in almost same situation as mine.
I guess it's better to trace how lucene and its analyzer work on our environment. But so far I haven't found out what I can do for that.

Anyway, I'll follow the topic, too. Thanx.

Akinori
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.