3

いろいろな方法を試したり、さまざまなサイトで検索したりしましたが、答えが得られませんでした。

デスクブックとデスクブックで同じ結果が必要で、デスクブック、デスクブック=>デスクブックと書いています。 しかし、あるページにデスクブックの結果が表示され、別のページにブックの結果が表示されますこれはLuceneパーサーによるものです。このリンクからこの情報を取得しました。

4

1 に答える 1

1

If you have a multiword synonym please check if you are following the below :-

Keep in mind that while the SynonymFilter will happily work with synonyms containing multiple words (ie: "sea biscuit, sea biscit, seabiscuit") The recommended approach for dealing with synonyms like this, is to expand the synonym when indexing.

So you have it during indexing time analysis only.

e.g.

use the same filter chain in both index and query time anaylsis, so the searched term matches the indexed terms.

e.g.

<fieldType name="text_synonym" class="solr.TextField">
    <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>       
        <filter class="solr.SynonymFilterFactory" synonyms="syms.txt" ignoreCase="true" expand="true"/>
    </analyzer>
    <analyzer type="query">
       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>
于 2012-11-20T07:42:42.277 に答える