es 的搜索

kibana语言查询

q指定查询语句

df默认字段,不指定时

sort排序/from和size用于分页

profile可以查看查询是如何倍执行的

查询title的值等于2012 的数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
GET /movies/_search?q=2012&df=title
{
  "profile": "true"
}
 
 
{
  "took" : 84,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 2,   2条数据
      "relation" : "eq"
    },
    "max_score" : 11.303033,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "72378",
        "_score" : 11.303033,
        "_source" : {
          "title" : "2012",
          "@version" : "1",
          "id" : "72378",
          "genre" : [
            "Action",
            "Drama",
            "Sci-Fi",
            "Thriller"
          ],
          "year" : 2009
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "105254",
        "_score" : 5.2497,
        "_source" : {
          "title" : "Crystal Fairy & the Magical Cactus and 2012",
          "@version" : "1",
          "id" : "105254",
          "genre" : [
            "Adventure",
            "Comedy"
          ],
          "year" : 2013
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "TermQuery",  使用的查询插件
                "description" : "title:2012",   查询条件
                "time_in_nanos" : 3407330,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 511430,
                  "match" : 0,
                  "next_doc_count" : 3,
                  "score_count" : 2,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 81786,
                  "build_scorer_count" : 5,
                  "create_weight" : 807809,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 2006294
                }
              }
            ],
            "rewrite_time" : 12151,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 1162515,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 163761
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  不指定字段范查询,查询值是2012 的数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
GET /movies/_search?q=2012
{
  "profile": "true"
}
 
 
{
  "took" : 12,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 219,   搜到219个结果<br>      "relation" : "eq"
    },
    "max_score" : 11.303033,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "72378",
        "_score" : 11.303033,
        "_source" : {
          "title" : "2012",
          "@version" : "1",
          "id" : "72378",
          "genre" : [
            "Action",
            "Drama",
            "Sci-Fi",
            "Thriller"
          ],
          "year" : 2009
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "2012",
        "_score" : 8.778942,
        "_source" : {
          "title" : "Back to the Future Part III",
          "@version" : "1",
          "id" : "2012",
          "genre" : [
            "Adventure",
            "Comedy",
            "Sci-Fi",
            "Western"
          ],
          "year" : 1990
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "105254",
        "_score" : 5.2497,
        "_source" : {
          "title" : "Crystal Fairy & the Magical Cactus and 2012",
          "@version" : "1",
          "id" : "105254",
          "genre" : [
            "Adventure",
            "Comedy"
          ],
          "year" : 2013
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "89745",
        "_score" : 1.0,
        "_source" : {
          "title" : "Avengers, The",
          "@version" : "1",
          "id" : "89745",
          "genre" : [
            "Action",
            "Adventure",
            "Sci-Fi",
            "IMAX"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91483",
        "_score" : 1.0,
        "_source" : {
          "title" : "Bullet to the Head",
          "@version" : "1",
          "id" : "91483",
          "genre" : [
            "Action",
            "Crime",
            "Film-Noir"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91485",
        "_score" : 1.0,
        "_source" : {
          "title" : "Expendables 2, The",
          "@version" : "1",
          "id" : "91485",
          "genre" : [
            "Action",
            "Adventure"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91500",
        "_score" : 1.0,
        "_source" : {
          "title" : "The Hunger Games",
          "@version" : "1",
          "id" : "91500",
          "genre" : [
            "Action",
            "Adventure",
            "Drama",
            "Sci-Fi",
            "Thriller"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91529",
        "_score" : 1.0,
        "_source" : {
          "title" : "Dark Knight Rises, The",
          "@version" : "1",
          "id" : "91529",
          "genre" : [
            "Action",
            "Adventure",
            "Crime",
            "IMAX"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91535",
        "_score" : 1.0,
        "_source" : {
          "title" : "Bourne Legacy, The",
          "@version" : "1",
          "id" : "91535",
          "genre" : [
            "Action",
            "Adventure",
            "Drama",
            "Thriller",
            "IMAX"
          ],
          "year" : 2012
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "91842",
        "_score" : 1.0,
        "_source" : {
          "title" : "Contraband",
          "@version" : "1",
          "id" : "91842",
          "genre" : [
            "Action",
            "Crime",
            "Drama",
            "Thriller"
          ],
          "year" : 2012
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "DisjunctionMaxQuery",
                "description" : "(title.keyword:2012 | id.keyword:2012 | year:[2012 TO 2012] | genre:2012 | @version:2012 | @version.keyword:2012 | id:2012 | genre.keyword:2012 | title:2012)",
                "time_in_nanos" : 5403323,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 893570,
                  "match" : 0,
                  "next_doc_count" : 223,
                  "score_count" : 219,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 515381,
                  "build_scorer_count" : 8,
                  "create_weight" : 1618837,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 2375084
                },
                "children" : [
                  {
                    "type" : "TermQuery",   查询使用的插件
                    "description" : "title.keyword:2012",   查询条件
                    "time_in_nanos" : 397074,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 2,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 1,
                      "compute_max_score_count" : 1,
                      "compute_max_score" : 46983,
                      "advance" : 20746,
                      "advance_count" : 2,
                      "score" : 545,
                      "build_scorer_count" : 5,
                      "create_weight" : 250249,
                      "shallow_advance" : 25677,
                      "create_weight_count" : 1,
                      "build_scorer" : 52862
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "id.keyword:2012",
                    "time_in_nanos" : 116608,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 2,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 1,
                      "compute_max_score_count" : 1,
                      "compute_max_score" : 5687,
                      "advance" : 2404,
                      "advance_count" : 2,
                      "score" : 2586,
                      "build_scorer_count" : 5,
                      "create_weight" : 93990,
                      "shallow_advance" : 1885,
                      "create_weight_count" : 1,
                      "build_scorer" : 10044
                    }
                  },
                  {
                    "type" : "PointRangeQuery",
                    "description" : "year:[2012 TO 2012]",
                    "time_in_nanos" : 2011315,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 2,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 19773,
                      "match" : 0,
                      "next_doc_count" : 26,
                      "score_count" : 216,
                      "compute_max_score_count" : 1,
                      "compute_max_score" : 5058,
                      "advance" : 154907,
                      "advance_count" : 194,
                      "score" : 79951,
                      "build_scorer_count" : 8,
                      "create_weight" : 1688,
                      "shallow_advance" : 4746,
                      "create_weight_count" : 1,
                      "build_scorer" : 1744744
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "genre:2012",
                    "time_in_nanos" : 115362,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 4,
                      "create_weight" : 112019,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 3338
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "@version:2012",
                    "time_in_nanos" : 40376,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 4,
                      "create_weight" : 38910,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 1461
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "@version.keyword:2012",
                    "time_in_nanos" : 20377,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 4,
                      "create_weight" : 19159,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 1213
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "id:2012",
                    "time_in_nanos" : 125553,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 2,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 1,
                      "compute_max_score_count" : 1,
                      "compute_max_score" : 3380,
                      "advance" : 1560,
                      "advance_count" : 2,
                      "score" : 1598,
                      "build_scorer_count" : 5,
                      "create_weight" : 86129,
                      "shallow_advance" : 1496,
                      "create_weight_count" : 1,
                      "build_scorer" : 31378
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "genre.keyword:2012",
                    "time_in_nanos" : 60834,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 4,
                      "create_weight" : 58651,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 2178
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:2012",
                    "time_in_nanos" : 123266,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 2,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 2,
                      "compute_max_score_count" : 1,
                      "compute_max_score" : 2740,
                      "advance" : 5030,
                      "advance_count" : 3,
                      "score" : 4682,
                      "build_scorer_count" : 5,
                      "create_weight" : 86213,
                      "shallow_advance" : 1401,
                      "create_weight_count" : 1,
                      "build_scorer" : 23186
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 31701,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 771058,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 667578
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  查询指定的字段,查询title值等于2012 的

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
GET /movies/_search?q=title:2012
{
  "profile": "true"
}
 
 
 
 
 
 
{
  "took" : 5,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 2,
      "relation" : "eq"
    },
    "max_score" : 11.303033,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "72378",
        "_score" : 11.303033,
        "_source" : {
          "title" : "2012",
          "@version" : "1",
          "id" : "72378",
          "genre" : [
            "Action",
            "Drama",
            "Sci-Fi",
            "Thriller"
          ],
          "year" : 2009
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "105254",
        "_score" : 5.2497,
        "_source" : {
          "title" : "Crystal Fairy & the Magical Cactus and 2012",
          "@version" : "1",
          "id" : "105254",
          "genre" : [
            "Adventure",
            "Comedy"
          ],
          "year" : 2013
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "TermQuery",
                "description" : "title:2012",   查询条件
                "time_in_nanos" : 232929,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 9977,
                  "match" : 0,
                  "next_doc_count" : 3,
                  "score_count" : 2,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 5393,
                  "build_scorer_count" : 5,
                  "create_weight" : 156659,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 60889
                }
              }
            ],
            "rewrite_time" : 12506,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 37068,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 18678
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  指定字段查询v.s 泛查询

1
q=title:2012   /q=2012

  

term vs Phrase

1
2
3
Beautiful Mind 等效于Beautiful OR Mind   满足一个就可以
 
"Beautiful Beautiful AND Mind 。Phrare查询,还要求前后顺序保持一致

term vs Phrase 测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
GET /movies/_search?q=title:Beautiful Mind
 {
   "profile": "true"
 }
{
  "took" : 42,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 20, 搜到20个结果
      "relation" : "eq"
    },
    "max_score" : 13.687479,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4995",
        "_score" : 13.687479,
        "_source" : {
          "title" : "Beautiful Mind, A",
          "@version" : "1",
          "id" : "4995",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3912",
        "_score" : 8.723258,
        "_source" : {
          "title" : "Beautiful",
          "@version" : "1",
          "id" : "3912",
          "genre" : [
            "Comedy",
            "Drama"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "47404",
        "_score" : 8.576847,
        "_source" : {
          "title" : "Mind Game",
          "@version" : "1",
          "id" : "47404",
          "genre" : [
            "Adventure",
            "Animation",
            "Comedy",
            "Fantasy",
            "Romance",
            "Sci-Fi"
          ],
          "year" : 2004
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "94",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Girls",
          "@version" : "1",
          "id" : "94",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "1046",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Thing",
          "@version" : "1",
          "id" : "1046",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3302",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful People",
          "@version" : "1",
          "id" : "3302",
          "genre" : [
            "Comedy"
          ],
          "year" : 1999
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4372",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Crazy/Beautiful",
          "@version" : "1",
          "id" : "4372",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4242",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "4242",
          "genre" : [
            "Comedy",
            "Crime",
            "Drama",
            "Thriller"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "90353",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Boy",
          "@version" : "1",
          "id" : "90353",
          "genre" : [
            "Drama"
          ],
          "year" : 2010
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "100487",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "100487",
          "genre" : [
            "Drama",
            "Fantasy",
            "Romance"
          ],
          "year" : 2013
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BooleanQuery",
                "description" : """title:beautiful (title.keyword:Mind | id.keyword:Mind | MatchNoDocsQuery("failed [year] query, caused by number_format_exception:[For input string: "Mind"]") | genre:mind | @version:mind | @version.keyword:Mind | id:mind | genre.keyword:Mind | title:mind)""",
                "time_in_nanos" : 32207647,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 20,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 466425,
                  "match" : 12045,
                  "next_doc_count" : 22,
                  "score_count" : 20,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 213299,
                  "build_scorer_count" : 6,
                  "create_weight" : 3357258,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 28158551
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:beautiful",
                    "time_in_nanos" : 1744017,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 16,
                      "compute_max_score_count" : 6,
                      "compute_max_score" : 38206,
                      "advance" : 57537,
                      "advance_count" : 18,
                      "score" : 181427,
                      "build_scorer_count" : 8,
                      "create_weight" : 1131525,
                      "shallow_advance" : 17684,
                      "create_weight_count" : 1,
                      "build_scorer" : 317583
                    }
                  },
                  {
                    "type" : "DisjunctionMaxQuery",
                    "description" : """(title.keyword:Mind | id.keyword:Mind | MatchNoDocsQuery("failed [year] query, caused by number_format_exception:[For input string: "Mind"]") | genre:mind | @version:mind | @version.keyword:Mind | id:mind | genre.keyword:Mind | title:mind)""",
                    "time_in_nanos" : 2366329,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 5,
                      "compute_max_score_count" : 6,
                      "compute_max_score" : 15590,
                      "advance" : 98398,
                      "advance_count" : 7,
                      "score" : 12125,
                      "build_scorer_count" : 8,
                      "create_weight" : 2071958,
                      "shallow_advance" : 8749,
                      "create_weight_count" : 1,
                      "build_scorer" : 159476
                    },
                    "children" : [
                      {
                        "type" : "TermQuery",
                        "description" : "title.keyword:Mind",
                        "time_in_nanos" : 266169,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 264336,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 1828
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "id.keyword:Mind",
                        "time_in_nanos" : 260988,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 259322,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 1661
                        }
                      },
                      {
                        "type" : "MatchNoDocsQuery",
                        "description" : """MatchNoDocsQuery("failed [year] query, caused by number_format_exception:[For input string: "Mind"]")""",
                        "time_in_nanos" : 4802,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 834,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 3963
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "genre:mind",
                        "time_in_nanos" : 296732,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 295891,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 836
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "@version:mind",
                        "time_in_nanos" : 139280,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 138598,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 677
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "@version.keyword:Mind",
                        "time_in_nanos" : 116205,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 115588,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 612
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "id:mind",
                        "time_in_nanos" : 209941,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 208700,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 1236
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "genre.keyword:Mind",
                        "time_in_nanos" : 148268,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 0,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 0,
                          "compute_max_score_count" : 0,
                          "compute_max_score" : 0,
                          "advance" : 0,
                          "advance_count" : 0,
                          "score" : 0,
                          "build_scorer_count" : 4,
                          "create_weight" : 147208,
                          "shallow_advance" : 0,
                          "create_weight_count" : 1,
                          "build_scorer" : 1055
                        }
                      },
                      {
                        "type" : "TermQuery",
                        "description" : "title:mind",
                        "time_in_nanos" : 647108,
                        "breakdown" : {
                          "set_min_competitive_score_count" : 0,
                          "match_count" : 0,
                          "shallow_advance_count" : 6,
                          "set_min_competitive_score" : 0,
                          "next_doc" : 0,
                          "match" : 0,
                          "next_doc_count" : 0,
                          "score_count" : 5,
                          "compute_max_score_count" : 6,
                          "compute_max_score" : 13885,
                          "advance" : 95785,
                          "advance_count" : 7,
                          "score" : 10966,
                          "build_scorer_count" : 6,
                          "create_weight" : 427668,
                          "shallow_advance" : 6655,
                          "create_weight_count" : 1,
                          "build_scorer" : 92118
                        }
                      }
                    ]
                  }
                ]
              }
            ],
            "rewrite_time" : 198085,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 373215,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 312807
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  

 

 分组与引号

1
2
title:(Beautiful AND Mind)
title="Beautiful Mind"

  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
GET /movies/_search?q=title:"Beautiful Mind"
 {
   "profile": "true"
 }
{
  "took" : 75,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 13.68748,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4995",
        "_score" : 13.68748,
        "_source" : {
          "title" : "Beautiful Mind, A",
          "@version" : "1",
          "id" : "4995",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "PhraseQuery",
                "description" : """title:"beautiful mind"""",
                "time_in_nanos" : 50328460,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 1,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 38518,
                  "match" : 14575831,
                  "next_doc_count" : 3,
                  "score_count" : 1,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 58361,
                  "build_scorer_count" : 6,
                  "create_weight" : 28740256,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 6915482
                }
              }
            ],
            "rewrite_time" : 11468,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 179228,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 129975
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  分组查询

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
GET /movies/_search?q=title:(Beautiful Mind)
 {
   "profile": "true"
 }
 
 
{
  "took" : 124,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 20,
      "relation" : "eq"
    },
    "max_score" : 13.687479,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4995",
        "_score" : 13.687479,
        "_source" : {
          "title" : "Beautiful Mind, A",
          "@version" : "1",
          "id" : "4995",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3912",
        "_score" : 8.723258,
        "_source" : {
          "title" : "Beautiful",
          "@version" : "1",
          "id" : "3912",
          "genre" : [
            "Comedy",
            "Drama"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "47404",
        "_score" : 8.576847,
        "_source" : {
          "title" : "Mind Game",
          "@version" : "1",
          "id" : "47404",
          "genre" : [
            "Adventure",
            "Animation",
            "Comedy",
            "Fantasy",
            "Romance",
            "Sci-Fi"
          ],
          "year" : 2004
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "94",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Girls",
          "@version" : "1",
          "id" : "94",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "1046",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Thing",
          "@version" : "1",
          "id" : "1046",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3302",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful People",
          "@version" : "1",
          "id" : "3302",
          "genre" : [
            "Comedy"
          ],
          "year" : 1999
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4372",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Crazy/Beautiful",
          "@version" : "1",
          "id" : "4372",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4242",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "4242",
          "genre" : [
            "Comedy",
            "Crime",
            "Drama",
            "Thriller"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "90353",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Boy",
          "@version" : "1",
          "id" : "90353",
          "genre" : [
            "Drama"
          ],
          "year" : 2010
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "100487",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "100487",
          "genre" : [
            "Drama",
            "Fantasy",
            "Romance"
          ],
          "year" : 2013
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BooleanQuery",
                "description" : "title:beautiful title:mind",
                "time_in_nanos" : 1382153,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 20,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 176512,
                  "match" : 7470,
                  "next_doc_count" : 22,
                  "score_count" : 20,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 56444,
                  "build_scorer_count" : 6,
                  "create_weight" : 538911,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 602747
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:beautiful",
                    "time_in_nanos" : 572182,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 16,
                      "compute_max_score_count" : 6,
                      "compute_max_score" : 24058,
                      "advance" : 26383,
                      "advance_count" : 18,
                      "score" : 25937,
                      "build_scorer_count" : 8,
                      "create_weight" : 349386,
                      "shallow_advance" : 6778,
                      "create_weight_count" : 1,
                      "build_scorer" : 139585
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:mind",
                    "time_in_nanos" : 221045,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 5,
                      "compute_max_score_count" : 6,
                      "compute_max_score" : 13130,
                      "advance" : 13106,
                      "advance_count" : 7,
                      "score" : 6414,
                      "build_scorer_count" : 8,
                      "create_weight" : 114325,
                      "shallow_advance" : 11050,
                      "create_weight_count" : 1,
                      "build_scorer" : 62987
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 47686,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 142302,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 110272
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  搜索中的逻辑判断

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
GET /movies/_search?q=title:(Beautiful AND Mind)   :表示搜索机油Beautiful 有有mind的数据
 {
   "profile": "true"   显示过程
 }
 
 
 
 
 
{
  "took" : 15,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 13.687479,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4995",
        "_score" : 13.687479,
        "_source" : {
          "title" : "Beautiful Mind, A",
          "@version" : "1",
          "id" : "4995",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BooleanQuery",布尔查询
                "description" : "+title:beautiful +title:mind",
                "time_in_nanos" : 7813951,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 279919,
                  "match" : 0,
                  "next_doc_count" : 3,
                  "score_count" : 1,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 3951,
                  "build_scorer_count" : 6,
                  "create_weight" : 851783,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 6678287
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:beautiful",
                    "time_in_nanos" : 2418058,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 1,
                      "compute_max_score_count" : 8,
                      "compute_max_score" : 59353,
                      "advance" : 33553,
                      "advance_count" : 5,
                      "score" : 7459,
                      "build_scorer_count" : 8,
                      "create_weight" : 540623,
                      "shallow_advance" : 15162,
                      "create_weight_count" : 1,
                      "build_scorer" : 1761879
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:mind",
                    "time_in_nanos" : 499539,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 6,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 1,
                      "compute_max_score_count" : 6,
                      "compute_max_score" : 21292,
                      "advance" : 103268,
                      "advance_count" : 7,
                      "score" : 7246,
                      "build_scorer_count" : 6,
                      "create_weight" : 277130,
                      "shallow_advance" : 10859,
                      "create_weight_count" : 1,
                      "build_scorer" : 79717
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 26637,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 171389,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 33965
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  查询制包含

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
GET /movies/_search?q=title:(Beautiful NOT Mind)
 {
   "profile": "true"
 }
 
 
{
  "took" : 8,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 15,
      "relation" : "eq"
    },
    "max_score" : 8.723258,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3912",
        "_score" : 8.723258,
        "_source" : {
          "title" : "Beautiful",
          "@version" : "1",
          "id" : "3912",
          "genre" : [
            "Comedy",
            "Drama"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "94",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Girls",
          "@version" : "1",
          "id" : "94",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "1046",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Thing",
          "@version" : "1",
          "id" : "1046",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3302",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful People",
          "@version" : "1",
          "id" : "3302",
          "genre" : [
            "Comedy"
          ],
          "year" : 1999
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4372",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Crazy/Beautiful",
          "@version" : "1",
          "id" : "4372",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4242",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "4242",
          "genre" : [
            "Comedy",
            "Crime",
            "Drama",
            "Thriller"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "90353",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Boy",
          "@version" : "1",
          "id" : "90353",
          "genre" : [
            "Drama"
          ],
          "year" : 2010
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "100487",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "100487",
          "genre" : [
            "Drama",
            "Fantasy",
            "Romance"
          ],
          "year" : 2013
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "114126",
        "_score" : 7.317063,
        "_source" : {
          "title" : "Beautiful Losers",
          "@version" : "1",
          "id" : "114126",
          "genre" : [
            "Documentary"
          ],
          "year" : 2008
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "2324",
        "_score" : 6.3012905,
        "_source" : {
          "title" : "Life Is Beautiful",
          "@version" : "1",
          "id" : "2324",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance",
            "War"
          ],
          "year" : 0
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BooleanQuery",
                "description" : "title:beautiful -title:mind",
                "time_in_nanos" : 1469904,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 16,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 70386,
                  "match" : 45969,
                  "next_doc_count" : 18,
                  "score_count" : 15,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 49699,
                  "build_scorer_count" : 6,
                  "create_weight" : 890155,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 413639
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:beautiful",
                    "time_in_nanos" : 383415,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 22807,
                      "match" : 0,
                      "next_doc_count" : 18,
                      "score_count" : 15,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 21589,
                      "build_scorer_count" : 8,
                      "create_weight" : 222824,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 116153
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:mind",
                    "time_in_nanos" : 170932,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 0,
                      "match" : 0,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 3943,
                      "advance_count" : 6,
                      "score" : 0,
                      "build_scorer_count" : 6,
                      "create_weight" : 28392,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 138584
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 37877,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 126287,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 70553
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  查询数字

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
GET /movies/_search?q=year:>=1980  查询大于等于1980的
 {
   "profile": "true"
 }
  
  
 
 
{
  "took" : 29,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 7350,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3",
        "_score" : 1.0,
        "_source" : {
          "title" : "Grumpier Old Men",
          "@version" : "1",
          "id" : "3",
          "genre" : [
            "Comedy",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "7",
        "_score" : 1.0,
        "_source" : {
          "title" : "Sabrina",
          "@version" : "1",
          "id" : "7",
          "genre" : [
            "Comedy",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "11",
        "_score" : 1.0,
        "_source" : {
          "title" : "American President, The",
          "@version" : "1",
          "id" : "11",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "15",
        "_score" : 1.0,
        "_source" : {
          "title" : "Cutthroat Island",
          "@version" : "1",
          "id" : "15",
          "genre" : [
            "Action",
            "Adventure",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "19",
        "_score" : 1.0,
        "_source" : {
          "title" : "Ace Ventura: When Nature Calls",
          "@version" : "1",
          "id" : "19",
          "genre" : [
            "Comedy"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "27",
        "_score" : 1.0,
        "_source" : {
          "title" : "Now and Then",
          "@version" : "1",
          "id" : "27",
          "genre" : [
            "Children",
            "Drama"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "2",
        "_score" : 1.0,
        "_source" : {
          "title" : "Jumanji",
          "@version" : "1",
          "id" : "2",
          "genre" : [
            "Adventure",
            "Children",
            "Fantasy"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "31",
        "_score" : 1.0,
        "_source" : {
          "title" : "Dangerous Minds",
          "@version" : "1",
          "id" : "31",
          "genre" : [
            "Drama"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "5",
        "_score" : 1.0,
        "_source" : {
          "title" : "Father of the Bride Part II",
          "@version" : "1",
          "id" : "5",
          "genre" : [
            "Comedy"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "18",
        "_score" : 1.0,
        "_source" : {
          "title" : "Four Rooms",
          "@version" : "1",
          "id" : "18",
          "genre" : [
            "Comedy"
          ],
          "year" : 1995
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "IndexOrDocValuesQuery",
                "description" : "year:[1980 TO 9223372036854775807]",
                "time_in_nanos" : 25227751,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 14575878,
                  "match" : 0,
                  "next_doc_count" : 7354,
                  "score_count" : 7350,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 1093078,
                  "build_scorer_count" : 8,
                  "create_weight" : 11725,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 9532357
                }
              }
            ],
            "rewrite_time" : 3423,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 2649860,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 1820928
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  通配符查询

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
GET /movies/_search?q=title:b*
 {
   "profile": "true"
    
 }
 
 
 
{
  "took" : 41,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1540,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "5",
        "_score" : 1.0,
        "_source" : {
          "title" : "Father of the Bride Part II",
          "@version" : "1",
          "id" : "5",
          "genre" : [
            "Comedy"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "105",
        "_score" : 1.0,
        "_source" : {
          "title" : "Bridges of Madison County, The",
          "@version" : "1",
          "id" : "105",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "54",
        "_score" : 1.0,
        "_source" : {
          "title" : "Big Green, The",
          "@version" : "1",
          "id" : "54",
          "genre" : [
            "Children",
            "Comedy"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "156",
        "_score" : 1.0,
        "_source" : {
          "title" : "Blue in the Face",
          "@version" : "1",
          "id" : "156",
          "genre" : [
            "Comedy",
            "Drama"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "249",
        "_score" : 1.0,
        "_source" : {
          "title" : "Immortal Beloved",
          "@version" : "1",
          "id" : "249",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1994
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "93",
        "_score" : 1.0,
        "_source" : {
          "title" : "Vampire in Brooklyn",
          "@version" : "1",
          "id" : "93",
          "genre" : [
            "Comedy",
            "Horror",
            "Romance"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "147",
        "_score" : 1.0,
        "_source" : {
          "title" : "Basketball Diaries, The",
          "@version" : "1",
          "id" : "147",
          "genre" : [
            "Drama"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "94",
        "_score" : 1.0,
        "_source" : {
          "title" : "Beautiful Girls",
          "@version" : "1",
          "id" : "94",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "110",
        "_score" : 1.0,
        "_source" : {
          "title" : "Braveheart",
          "@version" : "1",
          "id" : "110",
          "genre" : [
            "Action",
            "Drama",
            "War"
          ],
          "year" : 1995
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "113",
        "_score" : 1.0,
        "_source" : {
          "title" : "Before and After",
          "@version" : "1",
          "id" : "113",
          "genre" : [
            "Drama",
            "Mystery"
          ],
          "year" : 1996
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "MultiTermQueryConstantScoreWrapper",
                "description" : "title:b*",
                "time_in_nanos" : 23928099,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 457728,
                  "match" : 0,
                  "next_doc_count" : 1544,
                  "score_count" : 1540,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 84292,
                  "build_scorer_count" : 8,
                  "create_weight" : 434490,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 22948496
                }
              },
              {
                "type" : "BooleanQuery",
                "description" : "title:baby title:bad title:bed title:bedlam title:being title:beverly title:beyond title:bio title:bites title:bitter title:black title:blue title:boy title:bushwhacked",
                "time_in_nanos" : 1274383,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 52447,
                  "match" : 0,
                  "next_doc_count" : 17,
                  "score_count" : 0,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 0,
                  "build_scorer_count" : 2,
                  "create_weight" : 447017,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 774899
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:baby",
                    "time_in_nanos" : 256584,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 3350,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 188080,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 65148
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bad",
                    "time_in_nanos" : 31994,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1168,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 10277,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 20543
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bed",
                    "time_in_nanos" : 26018,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 839,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 9261,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 15912
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bedlam",
                    "time_in_nanos" : 20727,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 820,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7090,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12811
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:being",
                    "time_in_nanos" : 21723,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1279,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7875,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12563
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:beverly",
                    "time_in_nanos" : 22228,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 908,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7084,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 14230
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:beyond",
                    "time_in_nanos" : 25307,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1860,
                      "match" : 0,
                      "next_doc_count" : 3,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 8711,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 14729
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bio",
                    "time_in_nanos" : 21461,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1350,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 6481,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13624
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bites",
                    "time_in_nanos" : 21668,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 890,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 8412,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12360
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bitter",
                    "time_in_nanos" : 23732,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 3518,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7653,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12555
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:black",
                    "time_in_nanos" : 20238,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 752,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 6197,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13283
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:blue",
                    "time_in_nanos" : 25834,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 4747,
                      "match" : 0,
                      "next_doc_count" : 3,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7765,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13315
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:boy",
                    "time_in_nanos" : 21237,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 2570,
                      "match" : 0,
                      "next_doc_count" : 3,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 6006,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12654
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bushwhacked",
                    "time_in_nanos" : 20675,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 860,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 6441,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13368
                    }
                  }
                ]
              },
              {
                "type" : "BooleanQuery",
                "description" : "title:before title:big title:black title:blue title:body title:book title:born title:bride title:brothers title:buddha title:burnt title:butterfly title:by",
                "time_in_nanos" : 975206,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 40646,
                  "match" : 0,
                  "next_doc_count" : 14,
                  "score_count" : 0,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 0,
                  "build_scorer_count" : 2,
                  "create_weight" : 298985,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 635558
                },
                "children" : [
                  {
                    "type" : "TermQuery",
                    "description" : "title:before",
                    "time_in_nanos" : 130485,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 4076,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 30757,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 95646
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:big",
                    "time_in_nanos" : 39509,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1542,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 14375,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 23586
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:black",
                    "time_in_nanos" : 27187,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 986,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 8771,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 17424
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:blue",
                    "time_in_nanos" : 34339,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 6288,
                      "match" : 0,
                      "next_doc_count" : 3,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 9721,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 18323
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:body",
                    "time_in_nanos" : 23565,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 712,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7177,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 15670
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:book",
                    "time_in_nanos" : 23485,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1104,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 10276,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12099
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:born",
                    "time_in_nanos" : 21698,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 724,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 8338,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 12630
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:bride",
                    "time_in_nanos" : 24893,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1074,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 9472,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 14341
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:brothers",
                    "time_in_nanos" : 20560,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 872,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7749,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 11933
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:buddha",
                    "time_in_nanos" : 23335,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1074,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 8948,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13307
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:burnt",
                    "time_in_nanos" : 22335,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 1185,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7311,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13833
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:butterfly",
                    "time_in_nanos" : 18810,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 654,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 6377,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 11773
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "title:by",
                    "time_in_nanos" : 21635,
                    "breakdown" : {
                      "set_min_competitive_score_count" : 0,
                      "match_count" : 0,
                      "shallow_advance_count" : 0,
                      "set_min_competitive_score" : 0,
                      "next_doc" : 731,
                      "match" : 0,
                      "next_doc_count" : 2,
                      "score_count" : 0,
                      "compute_max_score_count" : 0,
                      "compute_max_score" : 0,
                      "advance" : 0,
                      "advance_count" : 0,
                      "score" : 0,
                      "build_scorer_count" : 3,
                      "create_weight" : 7176,
                      "shallow_advance" : 0,
                      "create_weight_count" : 1,
                      "build_scorer" : 13722
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 2045242,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 539403,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 298562
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

 模糊与近似度查询

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
GET /movies/_search?q=title:beautifl~1  表示后面有一个单词或者没有
 {
   "profile": "true"
 }
 
 
 
{
  "took" : 12,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 16,
      "relation" : "eq"
    },
    "max_score" : 7.632851,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3912",
        "_score" : 7.632851,
        "_source" : {
          "title" : "Beautiful",
          "@version" : "1",
          "id" : "3912",
          "genre" : [
            "Comedy",
            "Drama"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "94",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Girls",
          "@version" : "1",
          "id" : "94",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "1046",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Thing",
          "@version" : "1",
          "id" : "1046",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 1996
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "3302",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful People",
          "@version" : "1",
          "id" : "3302",
          "genre" : [
            "Comedy"
          ],
          "year" : 1999
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4372",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Crazy/Beautiful",
          "@version" : "1",
          "id" : "4372",
          "genre" : [
            "Drama",
            "Romance"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4242",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "4242",
          "genre" : [
            "Comedy",
            "Crime",
            "Drama",
            "Thriller"
          ],
          "year" : 2000
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "90353",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Boy",
          "@version" : "1",
          "id" : "90353",
          "genre" : [
            "Drama"
          ],
          "year" : 2010
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "100487",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Creatures",
          "@version" : "1",
          "id" : "100487",
          "genre" : [
            "Drama",
            "Fantasy",
            "Romance"
          ],
          "year" : 2013
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "114126",
        "_score" : 6.4024305,
        "_source" : {
          "title" : "Beautiful Losers",
          "@version" : "1",
          "id" : "114126",
          "genre" : [
            "Documentary"
          ],
          "year" : 2008
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "2324",
        "_score" : 5.5136294,
        "_source" : {
          "title" : "Life Is Beautiful",
          "@version" : "1",
          "id" : "2324",
          "genre" : [
            "Comedy",
            "Drama",
            "Romance",
            "War"
          ],
          "year" : 0
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BoostQuery",
                "description" : "(title:beautiful)^0.875",
                "time_in_nanos" : 2680392,
                "breakdown" : {
                  "set_min_competitive_score_count" : 6,
                  "match_count" : 0,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 4771,
                  "next_doc" : 2484452,
                  "match" : 0,
                  "next_doc_count" : 18,
                  "score_count" : 16,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 45819,
                  "build_scorer_count" : 6,
                  "create_weight" : 35055,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 110248
                }
              }
            ],
            "rewrite_time" : 6549837,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 170052,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 89352
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  查找中间有两个的数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
GET /movies/_search?q=title:"Lord Rings"~2
 {
   "profile": "true"
 }
 
 
{
  "took" : 5,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 4,
      "relation" : "eq"
    },
    "max_score" : 4.700435,
    "hits" : [
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "2116",
        "_score" : 4.700435,
        "_source" : {
          "title" : "Lord of the Rings, The",
          "@version" : "1",
          "id" : "2116",
          "genre" : [
            "Adventure",
            "Animation",
            "Children",
            "Fantasy"
          ],
          "year" : 1978
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "5952",
        "_score" : 3.2970178,
        "_source" : {
          "title" : "Lord of the Rings: The Two Towers, The",
          "@version" : "1",
          "id" : "5952",
          "genre" : [
            "Adventure",
            "Fantasy"
          ],
          "year" : 2002
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "4993",
        "_score" : 2.7496965,
        "_source" : {
          "title" : "Lord of the Rings: The Fellowship of the Ring, The",
          "@version" : "1",
          "id" : "4993",
          "genre" : [
            "Adventure",
            "Fantasy"
          ],
          "year" : 2001
        }
      },
      {
        "_index" : "movies",
        "_type" : "_doc",
        "_id" : "7153",
        "_score" : 2.7496965,
        "_source" : {
          "title" : "Lord of the Rings: The Return of the King, The",
          "@version" : "1",
          "id" : "7153",
          "genre" : [
            "Action",
            "Adventure",
            "Drama",
            "Fantasy"
          ],
          "year" : 2003
        }
      }
    ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[v0XQ31q0QT6yQONxMu8bfw][movies][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "PhraseQuery",
                "description" : """title:"lord rings"~2""",
                "time_in_nanos" : 527921,
                "breakdown" : {
                  "set_min_competitive_score_count" : 0,
                  "match_count" : 4,
                  "shallow_advance_count" : 0,
                  "set_min_competitive_score" : 0,
                  "next_doc" : 14633,
                  "match" : 90179,
                  "next_doc_count" : 6,
                  "score_count" : 4,
                  "compute_max_score_count" : 0,
                  "compute_max_score" : 0,
                  "advance" : 0,
                  "advance_count" : 0,
                  "score" : 6232,
                  "build_scorer_count" : 6,
                  "create_weight" : 229906,
                  "shallow_advance" : 0,
                  "create_weight_count" : 1,
                  "build_scorer" : 186950
                }
              }
            ],
            "rewrite_time" : 2161,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 31196,
                "children" : [
                  {
                    "name" : "SimpleTopScoreDocCollector",
                    "reason" : "search_top_hits",
                    "time_in_nanos" : 14153
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [ ]
      }
    ]
  }
}

  

 

posted @   烟雨楼台,行云流水  阅读(200)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
点击右上角即可分享
微信分享提示