Match search is slow, but I can't figure out the reason even using profile API

I'm using es 5.4 for searching purpose. But when I perform match query, I found that it costs hundreds of millisecond, which is unusual. I used the profile API to track the query and found that some words took unreasonable time. And I don't know what should I in the next.
Here is the detailed info(I queried on 'ag2'):
I establish a tow-node cluster, indices info:

yellow open   test1    LQHj9rj-Ro6E6hRIutCU6Q   5   1          0            0       954b           795b
yellow open   ag2_base qLZ1PpN0SBW6nXdMZOlpjg   5   1    1858557            0     21.9gb         21.9gb
yellow open   ag1      U-9-JFY1SXSNLgdyB5iipA   5   1     366128            0      6.4gb          4.5gb
yellow open   ag2      EcWa1psbQTGFQMXXEb7cxw   5   1    1858557            0     21.4gb         21.4gb
yellow open   ag4      zYl27gx4SE6sxYWmKvhlbg   5   1    1858557            0     21.9gb         21.9gb

the query:

curl -X GET localhost:9250/ag2/_search?pretty=true -d '
{
"profile": true,
"query": {
"match": {"title": "cure fever"}
}
}
'

the weird part:

              {
                "type" : "TermQuery",
                "description" : "title:cure",
                "time" : "163.5755780ms",
                "time_in_nanos" : 163575578,
                "breakdown" : {
                  "score" : 72259602,
                  "build_scorer_count" : 19,
                  "match_count" : 0,
                  "create_weight" : 35370852,
                  "next_doc" : 55374841,
                  "match" : 0,
                  "create_weight_count" : 1,
                  "next_doc_count" : 71435,
                  "score_count" : 71416,
                  "build_scorer" : 427412,
                  "advance" : 0,
                  "advance_count" : 0
                }
              },
              {
                "type" : "TermQuery",
                "description" : "title:fever",
                "time" : "0.2344140000ms",
                "time_in_nanos" : 234414,
                "breakdown" : {
                  "score" : 0,
                  "build_scorer_count" : 19,
                  "match_count" : 0,
                  "create_weight" : 230746,
                  "next_doc" : 0,
                  "match" : 0,
                  "create_weight_count" : 1,
                  "next_doc_count" : 0,
                  "score_count" : 0,
                  "build_scorer" : 3648,
                  "advance" : 0,
                  "advance_count" : 0
                }

the mapping:

new_mappings = {
        "properties": {
            "did": {"type": "long", "index": "not_analyzed"},
            "title": {"type": "string", "index": "analyzed", "fielddata": {"loading": "eager"}},
            "title_embed": {"type": "double", "index": "no"},
            "entity": {"type": "string", "index": "not_analyzed", "fielddata": {"loading": "eager"}},
            "tag": {"type": "string", "index": "not_analyzed"},
            "aliases": {"type": "string", "index": "not_analyzed"},
            "entity_with_field": {"type": "string", "index": "not_analyzed", "fielddata": {"loading": "eager"}},
            "original_title": {"type": "string", "index": "analyzed", "analyzer": "standard", "fielddata": {"loading": "eager"}},
            "did3": {"type": "string", "index": "not_analyzed"},
            "title_entity": {"type": "string", "index": "not_analyzed", "fielddata": {"loading": "eager"}},
        }
    }

the 'cure' word took 160ms while 'fever' took less 1ms...

I'm new to es, so I don't know how to tune the es and cannot find out where the problem is, es configuration or system environment.
I also want to know whether I can force to put some fields of particular index into memory so I can perform match query as fast as I can.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.