2016-08-29 6 views
0

インデックスとクエリの間にインデックスからストップワードを削除したいのですが、ストップワードの中の単語がインデックスから削除されていないようですクエリと結果ヒットを得る)。私はSolrの6.0を使用していますSolrインデックス削除ストップワードが機能していないようです

<fieldType name="text" class="solr.TextField"   positionIncrementGap="100"> 
      <analyzer type="index"> 
      <tokenizer class="solr.StandardTokenizerFactory"/> 
      <!-- in this example, we will only use synonyms at query time 
      <filter class="solr.SynonymFilterFactory"   synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> 
      --> 
      <filter class="solr.LowerCaseFilterFactory"/> 
      <filter class="solr.StopFilterFactory"   ignoreCase="true"   words="stopwords.txt" /> 
      <filter class="solr.WordDelimiterFilterFactory"   generateWordParts="1" generateNumberParts="1" catenateWords="1"   catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>   
      <filter class="solr.KeywordMarkerFilterFactory"   protected="protwords.txt"/> 
      <filter class="solr.KStemFilterFactory"/> 
      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> 
      </analyzer> 
      <analyzer type="query"> 
      <tokenizer class="solr.StandardTokenizerFactory"/> 
      <filter class="solr.SynonymFilterFactory"   synonyms="synonyms.txt" ignoreCase="true" expand="true"/> 
      <filter class="solr.LowerCaseFilterFactory"/> 
      <filter class="solr.StopFilterFactory" ignoreCase="true"   words="stopwords.txt" /> 
      <filter class="solr.WordDelimiterFilterFactory"   generateWordParts="1" generateNumberParts="1" catenateWords="0"   catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>   
      <filter class="solr.KeywordMarkerFilterFactory"   protected="protwords.txt"/> 
      <filter class="solr.KStemFilterFactory"/> 
      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> 
      </analyzer> 
     </fieldType> 
     <field name="_version_" type="long" indexed="true" stored="true"/> 
     <field name="id" type="string" indexed="true" stored="true"   required="true" multiValued="false" /> 
     <field name="post_content" type="text" indexed="true"   stored="true"/> 
     <field name="post_title" type="text" indexed="true" stored="true"/> 
     <field name="post_date" type="date" indexed="true" stored="true"/> 
     <field name="_text_" type="text" indexed="true"   stored="false"   multiValued="true" termVectors="true"     termPositions="true" termOffsets="true"/> 

は、ここに私のschema.xmlです。何かアドバイスのため

おかげで、

ザビーネ

+0

同じ名前のファイルは存在しますか? stopwords.txtファイルにこれらの単語がありますか? –

+0

コミュニティを傷つけて申し訳ありません - 私は "format =" snowball "" –

+0

問題を追加することで自分自身で問題を解決しました。 –

答えて

0

デフォルトでは、その中に任意のストップワードを持っていませんstopwords.txtファイル。

これは、Solrによって与えられたconfigSetのどれでも確認できます。

conf/langフォルダをチェックすると、多くのストップワードファイルが見つかるでしょう。

あなたの言語に応じて、あなたに適したものを使用することができます。

stopwords_en.txtファイルからストップワードをコピーし、ファイルstopward.txtにパスconfigsets/basic_configs/conf/を貼り付けることができます。ここでは、configsetはあなたのために異なるかもしれません。それはあなたが使ったものに依存します。

関連する問題