You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steve Huckle <st...@gmail.com> on 2014/04/15 12:31:58 UTC
Analysis Tool Not Working for CharFilterFactory?
I have used a CharFilterFactory in my schema.xml for fileType
text_general, so that queries for cafe and café return the same results.
It works correctly. Here's the relevant part of my schema.xml:
<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.MappingCharFilterFactory"
mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory"
mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
However, using the analysis tool within the admin ui, if I analyse
text_general with any field values for index and query, the output for
ST, SF and LCF are all empty. Is this a bug?
--
Steve Huckle
If you print this email, eventually you'll want to throw it away. But there is no away. So don't print this email, even if you have to.
Re: Analysis Tool Not Working for CharFilterFactory?
Posted by Stefan Matheis <ma...@gmail.com>.
Steve
you didn't mention which release you're using, but from looking at the screenshot i'd guess you're hitting http://issues.apache.org/jira/browse/SOLR-5800 - which was introduced in 4.7.0 and fixed in 4.7.1+
HTH
-Stefan
On Tuesday, April 15, 2014 at 12:31 PM, Steve Huckle wrote:
> I have used a CharFilterFactory in my schema.xml for fileType text_general, so that queries for cafe and café return the same results. It works correctly. Here's the relevant part of my schema.xml:
>
> <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
> <analyzer type="index">
> <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> <analyzer type="query">
> <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>
> However, using the analysis tool within the admin ui, if I analyse text_general with any field values for index and query, the output for ST, SF and LCF are all empty. Is this a bug?
>
>
> -- Steve Huckle If you print this email, eventually you'll want to throw it away. But there is no away. So don't print this email, even if you have to.
Re: Analysis Tool Not Working for CharFilterFactory?
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Which version of Solr. I think there was a bug in ui. You can check network
traffic to confirm.
On 15/04/2014 5:32 pm, "Steve Huckle" <st...@gmail.com> wrote:
> I have used a CharFilterFactory in my schema.xml for fileType
> text_general, so that queries for cafe and café return the same results. It
> works correctly. Here's the relevant part of my schema.xml:
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100">
> <analyzer type="index">
> <charFilter class="solr.MappingCharFilterFactory"
> mapping="mapping-ISOLatin1Accent.txt"/>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> <analyzer type="query">
> <charFilter class="solr.MappingCharFilterFactory"
> mapping="mapping-ISOLatin1Accent.txt"/>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>
> However, using the analysis tool within the admin ui, if I analyse
> text_general with any field values for index and query, the output for ST,
> SF and LCF are all empty. Is this a bug?
>
>
> --
> Steve Huckle
>
> If you print this email, eventually you'll want to throw it away. But there is no away. So don't print this email, even if you have to.
>
>