2016-05-12 2 views

答えて

0

私は同じ問題がありました。動作させるには、以下を実行してください。

あなたは、インデックスを削除していることを確認してください:ノードに続いてhttp://127.0.0.1:9200/ {your_name}

JS、このようなマッピングを作成します:例えば郵便配達員経由

DELETE要求を

var schema = new Schema({ 
    product_name: String, 
    description: { 
     type: String, 
     es_type: 'multi_field', 
     es_fields: { 
      multi_field: { type: 'string', index: 'analyzed' }, 
      untouched: { type: 'string', index: 'not_analyzed' } 
     } 
    } 
}); 

最後にあなたがすることができます

{ 
"query" : { 
    "constant_score" : { 
     "filter" : { 
      "term" : { 
       "description.multi_field" : "nog een testje" 
      } 
     } 
    } 
}}// to use other field, change the . after description 
{ 
"query" : { 
    "constant_score" : { 
     "filter" : { 
      "term" : { 
       "description.untouched" : "nog een testje" 
      } 
     } 
    } 
} 

}

関連する問題