需要脚本演示、定制部署或海外获客方案?访问 Facebook18 官网
首页 / twitter引流推广

推特上的18内容(推特精选内容怎么看)

2023-01-18twitter引流推广静态 HTML 文章

未标题-1-4 (1).png

Full Text Query 包括

intervals query :查询时候考虑分词间间隔 max_gaps 指query之间的间隔蕞大允许值,0表示必须在一起,-1,没有间隔要求汉字可能占2位ordered If true, matching terms must appear in their specified order. Defaults to false.可以通过指定use_field实现多个字段关联查询match query :支持 fuzzy matching 及同义词查询.注意使用operator 实现必须包括多个分词match_bool_prefix在match基础上加上一个前缀查询可以理解为N-1的term query 加上有弟N各前缀的分词match_bool_prefix 实际转换一个bool query,should里面带了prefixmatch_phrase :短语查询可以考虑替代termmatch_phrase_prefix短语查询加前缀multi_match :多个字段的match在多个字段内查找支持多种类型typebest_fields: Finds documents which match any field, but
uses the _score from the best field.most_fields:Finds documents which match any field and combines the
_score from each field.cross_fields:Treats fields with the same analyzer as though they were one big field. Looks for each word in any field.phrase:Runs a match_phrasephrase_prefix:Runs a match_phrase_prefixbool_prefix:Creates a match_bool_prefixcommon terms: 一般term查询query_string 字符串查找.default_field 可以不输入,不可以与fields同时使用#fields Array of fields you wish to search.可以使用AND|OR|NOT 对多个字段进行query,推荐专家使用simple_query_string简化稳定版query_string more robust version of the query_string syntax suitable for exposing directly to users.

以下是测试代码

GET twitter/_searchGET twitter/_mappingPOST _bulk{"index":{"_index":"twitter","_id":1}}{"user":"张三","message":"今儿天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"中国北京市海淀区","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":2}}{"user":"老刘","message":"出发,下一站云南!","uid":3,"age":22,"city":"北京","province":"北京","country":"中国","address":"中国北京市东城区台基厂三条3号","location":{"lat":"39.904313","lon":"226.412754"}, "DOB": "1997-04-01"}{"index":{"_index":"twitter","_id":3}}{"user":"李四","message":"happy birthday!","uid":4,"age":25,"city":"北京","province":"北京","country":"中国","address":"中国北京市东城区","location":{"lat":"39.893801","lon":"226.408986"}, "DOB": "1994-04-01"}{"index":{"_index":"twitter","_id":4}}{"user":"老贾","message":"123,gogogo","uid":5,"age":30,"city":"北京","province":"北京","country":"中国","address":"中国北京朝阳区建国门市场","location":{"lat":"39.718256","lon":"226.367910"}, "DOB": "1989-04-01"}{"index":{"_index":"twitter","_id":5}}{"user":"老王","message":"Happy BirthDay My Friend!","uid":6,"age":26,"city":"北京","province":"北京","country":"中国","address":"中国北京市朝阳区国贸","location":{"lat":"39.918256","lon":"226.467910"}, "DOB": "1993-04-01"}{"index":{"_index":"twitter","_id":6}}{"user":"老吴","message":"好友来了都今天我生日,好友来了,什么 birthday happy 就成!","uid":7,"age":28,"city":"上海","province":"上海","country":"中国","address":"中国上海市闵行区","location":{"lat":"31.175927","lon":"121.383328"}, "DOB": "1991-04-01"}{"index":{"_index":"twitter","_id":7}}{"user":"老吴","message":"好友来了都今天我生日,好友来了,什么 birthday happy 就成!","uid":7,"age":28,"city":"ShangHai","province":"上海","country":"中国","address":"中国上海市闵行区","location":{"lat":"31.175927","lon":"121.383328"}, "DOB": "1991-04-01"}POST twitter/_search{ "query": { "intervals": { "address": { "all_of": { "intervals": [ { "match": { "query": "bei jing", "max_gaps": -1, "ordered": true } }, { "any_of": { "intervals": [ { "match": { "query": "san" } }, { "match": { "query": "cold porridge" } } ] } } ] } } } }}POST _bulk{"index":{"_index":"twitter","_id":10}}{"user":"北海淀","message":"今儿天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"北海京区市","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":22}}{"user":"京区市","message":"今儿天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"北海区区区京市","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":12}}{"user":"京区市","message":"今儿天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"bei san jing","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}POST twitter/_refreshPOST twitter/_flush#max_gaps 指query之间的间隔蕞大允许值,0表示必须在一起,-1, 没有间隔要求#汉字可能占2位#ordered If true, matching terms must appear in their specified order. Defaults to false.POST twitter/_search{ "_source": ["user", "address"], "query": { "intervals": { "address": { "all_of": { "ordered": true, "intervals": [ { "match": { "query": "北 京 市", "max_gaps": 1, "ordered": true } } ] } } } }}#通过指定use_field实现两个字段address及message关联查询POST twitter/_search{ "query": { "intervals": { "address": { "all_of": { "intervals": [ { "match": { "query": "happy", "max_gaps": -1, "ordered": true, "use_field": "message" } }, { "match": { "query": "北京", "max_gaps": -1, "ordered": true } } ] } } } }}GET twitter/_search{ "query": { "match": { "address": { "query": "京北 北京", "operator": "or", "auto_generate_synonyms_phrase_query" : false } } }}POST _bulk{"index":{"_index":"twitter","_id":14}}{"user":"北海淀","message":"今儿天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}#短语查询#可以考虑替代termGET twitter/_search{ "query": { "match_phrase" : { "address": { "query" : "京北" } } }}POST _bulk{"index":{"_index":"twitter","_id":15}}{"user":"北海淀","message":"pre behind","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":16}}{"user":"prefix behind","message":"another prefixWord behind","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":17}}{"user":"北海淀","message":"behind before pre ","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":18}}{"user":"北海淀","message":"prefix behind","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}POST twitter/_refreshPOST twitter/_flush##match_bool_prefix 指单词里面有蕞后一个词开头的,如happyDayGET twitter/_search{ "query": { "match_bool_prefix" : { "message" : "BirthDay Happy" } }}#match_bool_prefix 实际转换为如下KQL#You can speed up prefix queries using the index_prefixes mapping parameter.GET twitter/_search{ "_source": "message", "query": { "bool" : { "should": [ { "term": { "message": "behind" }}, { "prefix": { "message": "prefix"}} ] } }}POST _bulk{"index":{"_index":"twitter","_id":19}}{"user":"prefix behind","message":"happy birthday","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":20}}{"user":"北海淀","message":"happy birthday! friend","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}{"index":{"_index":"twitter","_id":21}}{"user":"北海淀","message":"happy birthday friend","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"京北","location":{"lat":"39.970718","lon":"226.325747"}, "DOB": "1999-04-01"}##match_bool_prefix 只单词里面有蕞后一个词开头的,ex friendGET twitter/_search{ "_source": "message", "query": { "match_phrase_prefix": { "message" : "happy birthday fr" } }}#The multi_match query builds on the match query to allow multi-field queries:#支持多种类型typeGET twitter/_search{ "_source": "message", "query": { "multi_match": { "query" : "happy birthday" , "fields": [ "address", "message" ], "type": "phrase" } }}#Returns documents based on a provided query string, using a parser with a strict syntax.#query_string 是类型,不能修改#default_field 可以不输入,不可以与fields同时使用#fields Array of fields you wish to search.GET twitter/_search{ "query": { "query_string" : { "query" : " OR ", "fields": ["address","message"] } }}GET twitter/_search{ "query": { "simple_query_string": { "query" : " OR ", "fields" : ["message","city"] } }}

海外精品引流脚本–最强海外引流  

官网:www.facebook18.com

唯一TG:https://t.me/Facebook181818

Facebook.png

查看演示与获取方案

读完本篇后,可通过下方入口查看演示视频、联系客服或访问主站。