我是Elastica搜索的新手。
您能帮我建立查询吗?我需要按名称搜索。
GET /site/file/_search
"hits": [
{
"_index": "site",
"_type": "file",
"_id": "135",
"_score": 1,
"_source": {
"userId": 0,
"name": "P1030021j.jpg",
"extension": "jpg",
"size": 1256
}
}
]
谢谢,
最佳答案
我找到了解决我问题的方法:
{
"fuzzy_like_this" : {
"fields" : ["name"],
"like_text" : "Search string",
"max_query_terms" : 12
}
}
关于php - 使用Elastica进行全文查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21270572/