我將索引title_o作爲非索引字段。查詢以獲得精確搜索不返回結果。當title_o匹配時,我需要查找文檔是test1。請幫忙。彈性搜索中的完全匹配搜索不起作用
Indexed following documents:
curl -XPUT 'http://localhost:9200/test/test10/1' -d '
{
"doi":"1234",
"title":"this is test1",
"title_o":"this is test1"
}'
curl -XPUT 'http://localhost:9200/test/test10/3' -d '
{
"doi":"1234",
"title":"this is test3",
"title_o":"this is test3"
}'
Search:
curl -XGET 'http://localhost:9200/test/test10/_search?pretty=true' -d '
{
"query" : {
"filtered" : {
"filter" : {
"term" : {
"title_o" : "this is test1"
}
}
}
}
}'
你可以發佈映射嗎? – Tom 2015-04-02 23:51:12