[daisy] [JIRA] Commented: (DSY-467) Support language specific Analyzer (for example DutchAnalyzer) and fall back on StandardAnalyzer

Bruno Dumon (JIRA) issues at cocoondev.org
Tue May 8 08:35:20 CDT 2007


    [ http://issues.cocoondev.org//browse/DSY-467?page=comments#action_13167 ] 

Bruno Dumon commented on DSY-467:
---------------------------------

Making this adjustment wouldn't be too difficult, but the harder part is that one should typically use the same analyzer for searching as for indexing. Any smart ideas about how to handle this would be helpful.

One approach might be to keep two indexes: one language-neutral one and one to be used when the language is known (i.e. when the search is limited to a certain language variant).

> Support language specific Analyzer (for example DutchAnalyzer) and fall back on StandardAnalyzer
> ------------------------------------------------------------------------------------------------
>
>          Key: DSY-467
>          URL: http://issues.cocoondev.org//browse/DSY-467
>      Project: Daisy
>         Type: Feature Wish
>   Components: Querying and indexing (repository)
>     Versions: 2.0.1
>     Reporter: Geoffrey De Smet

>
> In this file:
>   http://svn.cocoondev.org/repos/daisy/tags/RELEASE_2_0_0/daisy/repository/server/src/java/org/outerj/daisy/ftindex/FullTextIndexImpl.java
> we find this code:
>     private IndexWriter constructIndexWriter() throws IOException {
>         return new IndexWriter(indexDirectory, new StandardAnalyzer());
>     }
> which says that lucene uses StandardAnalyzer, however when we insert words like "werken", "gewerkt" and search for "werkte", it doesn't find it.
> The solution is to use a DutchAnalyzer instead.
> A solution might be: ask the language code of the daisy branch,
> then check if there's a Analyzer for that (for example "nl" => DutchAnalyzer)
> and do a fall back on StandardAnalyzer if it doesn't exist.
> Problem is that the current FullTextIndexImpl probably uses a singleton analyzer, independ of in which branch scope it's processed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list