Updated on 2024-11-29 GMT+08:00

Not Using Wildcard Fuzzy Query

By default, the *? regular expression is used for fuzzy match. When the data volume level reaches TB+ or even higher, the fuzzy query usually takes a long time, which may cause memory overflow, suspension, or even breakdown. Therefore, do not use fuzzy query when there is a large amount of data.

The following is an example of fuzzy query in security mode:

curl -XGET --tlsv1.2 --negotiate -k -u : "https://ip:httpport/myindex-001/_search?pretty" -H 'Content-Type: application/json' -d'
{
  "query": {
    "wildcard" : {
	"name" : "*cellent" 
	}
  }
}'