0

コンパスでデータのインデックス作成と検索を行う際に、コンパス アナライザーを追加するにはどうすればよいですか。コンパスにスキーマ ベースの構成を使用しています。 、 の 。デフォルトのアナライザーは、インデックス作成用に指定したデータから AND 、 OR 、 IN を無視します。

コードまたは xml を使用して Snowball アナライザーを構成するにはどうすればよいですか。誰かが私に例を投稿できれば。

4

1 に答える 1

0

以下に例を示します。詳細はこちらからもご覧いただけます

<comp:searchEngine useCompoundFile="false" cacheInvalidationInterval="-1">
        <comp:allProperty enable="false" />
        <!--
            By Default, compass uses StandardAnalyzer for indexing and searching. StandardAnalyzer
            will use certain stop words (stop words are not indexed and hence not searcheable) which are
            valid search terms in the DataSource World. For e.g. 'in' for Indiana state, 'or' for Oregon etc.
            So we need to provide our own Analyzer.
        -->
        <comp:analyzer name="default" type="CustomAnalyzer"
            analyzerClass="com.ICStandardAnalyzer" />
        <comp:analyzer name="search" type="CustomAnalyzer"
            analyzerClass="com.ICStandardAnalyzer" />
        <!--
            Disable the optimizer as we will optimize the index as a separate batch job

            Also, the merge factor is set to 1000, so that merging doesnt happen during the commit time.
            Merging is a time consuming process and will be done by the batched optimizer
        -->
        <comp:optimizer schedule="false" mergeFactor="1000"/>
    </comp:searchEngine>
于 2010-12-01T01:31:09.980 に答える