1. 在线体验
1. es
sql:
GET /saylo_search_30005/_search
{
    "query": {
      "function_score": {
        "query": {
          "bool": {
            "must": [
                {
                    "multi_match": {
                        "query": "Jake",
                        "fields": [
                           "tags", "name", "desc", "tags_ai", "tags_user"
                        ]
                    }
                },
              
                {
                    "terms": {
                        "is_active": ["true"]
                     
                    }
                }
              
            ],
            "filter": []
        }},
        "functions": [
          {"script_score": {
            "script": "_score"
          }}
        ]
      }
    },
    "highlight" : {
        "fields" : {
            "tags": {},
            "name": {},
            "tags_ai": {},
             "tags_user": {}
        }
    },
    "_source": [],
    "from": 0,
    "size": 600
    
}
        
2. vdb
实例地址:https://console.cloud.tencent.com/vdb/instance/secretkey?region=ap-shanghai\&InstanceId=vdb-hrb36ywa


2. ES召回sql
1. 字段匹配
https://es-h3z4l9we.kibana.tencentelasticsearch.com:5601/app/dev_tools#/console
key_word
GET /saylo_rec_30033/_search
{
 
  "query": {
    "bool": {
      "must": [
        {"term": {
          "name": {
            "value": "狐妖女友"
          }
        }}
      ]
    }
  }
}
        text全匹配
GET /saylo_search_30033/_search
{
  "query": {
    "match_phrase": {
      "name": "狐妖女友"
    }
  }
}
        2. 分词匹配
分析
POST /_analyze
{
  "analyzer": "ik_smart",
  "text": "狐妖女友"
}
        匹配
GET /saylo_rec_30033/_search
{
 
  "query": {
    "bool": {
      "must": [
       {
          "match": {
            "name": {
              "query": "狐妖女友",
            "analyzer": "ik_smart"
            }
            
          }
        }
      ]
    }
  }
}