lucene FrenchAnalyser bad implementation

View: New views
2 Messages — Rating Filter:   Alert me  

lucene FrenchAnalyser bad implementation

by Jeremy Lal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,
i added french language to atleap, then i had trouble with search results page :
java.lang.IllegalArgumentException: fieldName must not be null
        at org.apache.lucene.analysis.fr.FrenchAnalyzer.tokenStream(FrenchAnalyzer.java:136)
        at com.blandware.atleap.search.SearchManager.search(SearchManager.java:744)
        at com.blandware.atleap.webapp.action.core.search.SearchAction.execute(SearchAction.java:136)

so i checked and added a modified FrenchAnalyzer.java took from Lucene-analyzers
(lucene-2.3.0/contrib/analyzers/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java)
and put it there :
src/web/com/blandware/atleap/search/analysis/FrenchAnalyzer.java

the modification is simple : simply comment this line at the end the file :
if (fieldName == null) throw new IllegalArgumentException("fieldName must not be null");

you'll notice the fieldName variable is not even used...
i guess it's a bug of lucene-analyzers, according to the doc this condition is not required.

Then search works ok.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: lucene FrenchAnalyser bad implementation

by Roman Puchkovskiy-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, we'll include this in the next AtLeap release.

Jérémy Lal пишет:

> hi,
> i added french language to atleap, then i had trouble with search
> results page :
> java.lang.IllegalArgumentException: fieldName must not be null
>     at
> org.apache.lucene.analysis.fr.FrenchAnalyzer.tokenStream(FrenchAnalyzer.java:136)
>
>     at
> com.blandware.atleap.search.SearchManager.search(SearchManager.java:744)
>     at
> com.blandware.atleap.webapp.action.core.search.SearchAction.execute(SearchAction.java:136)
>
>
> so i checked and added a modified FrenchAnalyzer.java took from
> Lucene-analyzers
> (lucene-2.3.0/contrib/analyzers/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java)
>
> and put it there :
> src/web/com/blandware/atleap/search/analysis/FrenchAnalyzer.java
>
> the modification is simple : simply comment this line at the end the file :
> if (fieldName == null) throw new IllegalArgumentException("fieldName
> must not be null");
>
> you'll notice the fieldName variable is not even used...
> i guess it's a bug of lucene-analyzers, according to the doc this
> condition is not required.
>
> Then search works ok.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
> .
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price