Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento-SOLR模糊搜索_Magento_Search_Solr_Fuzzy Search_Porter Stemmer - Fatal编程技术网

Magento-SOLR模糊搜索

Magento-SOLR模糊搜索,magento,search,solr,fuzzy-search,porter-stemmer,Magento,Search,Solr,Fuzzy Search,Porter Stemmer,我在magento中使用SOLR搜索,并尝试使用SOLR模糊搜索的功能。但到目前为止似乎没有运气 我曾尝试在搜索查询结束时使用tilda(~),也尝试使用“PorterStemFilterFactory”,这是迄今为止我所知道的最好的stem工厂。但这并没有给我任何结果。例如我的产品名为“设拉子”。因此,如果使用“shirag”或“shrag”进行搜索,模糊搜索将返回相同的结果 这是我的模式部分(我只提供英文部分,因为这是我唯一使用的部分) 请参见和 如果你在寻找自动建议,那么使用肯定是另一个

我在magento中使用SOLR搜索,并尝试使用SOLR模糊搜索的功能。但到目前为止似乎没有运气

我曾尝试在搜索查询结束时使用tilda(~),也尝试使用“PorterStemFilterFactory”,这是迄今为止我所知道的最好的stem工厂。但这并没有给我任何结果。例如我的产品名为“设拉子”。因此,如果使用“shirag”或“shrag”进行搜索,模糊搜索将返回相同的结果

这是我的模式部分(我只提供英文部分,因为这是我唯一使用的部分)


请参见和

如果你在寻找自动建议,那么使用肯定是另一个选项。

<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
        <analyzer type="index">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
            <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="10" />
            <!--
                In this example, we will only use synonyms at query time.
                <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true"
                    expand="false"/>
            -->
            <!--
                Case insensitive stop word removal. Add enablePositionIncrements=true in both the index and query
                analyzers to leave a 'gap' for more accurate phrase queries.
            -->
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"
                    enablePositionIncrements="true"/>
            <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
                    catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
            <filter class="solr.SynonymFilterFactory" synonyms="synonyms_en.txt" ignoreCase="true" expand="true"/>
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"
                    enablePositionIncrements="true"/>
            <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
                    catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
            <filter class="solr.PorterStemFilterFactory" />
        </analyzer>
    </fieldType>