Elasticsearch7.6.2 – rest complex query


Then, in the previous article, query complex query is performed


This relationship, equivalent to and, must be satisfied at the same time



This relationship is equivalent to or. Just meet one


Three pieces of data were found here



must_ Not quite so! So one piece of data is found here. You can find it only if all of them are not satisfied


Range interval query

gt > 
gte >=
lt <
lte <=


Interval query is performed by range


Wildcard wildcard query

Wildcards * and * are allowed? To query
*Represents 0 or more characters
? Represents any character



Term exact query

This query has pits. First, look at the following query


Desc I only passed a word “Yun” and found that it can be queried normally, but usually, I want to check the entry, such as “Sports”

Then replace it with sports:


Isn’t it amazing that I can’t find out

This is actually caused when the table is built

You can use JD here_ Query and compare the goods library:


Why JD_ Goods can be found out, but lisen can’t find out?

Let’s see the difference between the fields on both sides through get:


You can see JD_ Title Field of the goods, specifies the word divider




There are multiple highlight fields in the return value, which are the highlighted fields and contents. During display, replacement operation is required