一、Term查询
对输入条件作为一个整体,不做分词,在倒排索引中找到准确的词项,并算分
Term Level Query:Term Query/Range Query/Exsits Query/Prefix Query /Wilcard Qery
可以通过Constant Score将查询转换成一个Filtering,避免TF-DF算分,并利用缓存,提升性能
DELETE products
PUT products
{
"settings": {
"number_of_shards": 1
}
}
POST /products/_bulk
{
"index": {
"_id": 1 }}
{
"productID" : "XHDK-A-1293-#fJ3","desc":"iPhone" }
{
"index": {
"_id": 2 }}
{
"productID" : "KDKE-B-9947-#kL5","desc"