2016-06-14 4 views
0

私はyii2-elasticsearchを複数のフィールドで使用して、割り当てられたアナライザーでドキュメント内のすべてのフィールドをチェックします。エラスティックサーチでのマッピングのために複数ワード、マルチフィールド検索

だから私はマッピングしている場合:

"settings": { 
     "analysis": { 
      "analyzer": { 
      "lowercase_keyword": { 
       "tokenizer": "keyword", 
       "filter": [ "lowercase"] 
      } 
      } 
     } 
     }, 
    "mappings" : { 
     "typeName" :{  
      "properties" : { 
      "id" : { 
       "type" : "string", 
       "index" : "not_analyzed" 
      }, 
      "company_name" : { 
       "type" : "string", 
       "index" : "analyzed", 
       "analyzer" : "lowercase_keyword", 
      }, 
      "product_name" : { 
       "type" : "string", 
       "index" : "analyzed", 
       "analyzer" : "lowercase_keyword", 
      }, 
      "product_desc" : { 
       "type" : "string", 
       "index" : "not_analyzed" 
      },  
      } 
     } 
     } 
    } 

を私はCOMPANY_NAME、PRODUCT_NAME、product_desc内の単語を検索したいです。

答えて

関連する問題