Create_weight takes too long

when i use query to search, the profile API show me the each TermQuery search time, the time of create_weight takes 90%. I use shingle (2 words, 3 words), is that makes term dictionary too large? Any suggest can help?

my search:
{
"profile": true,
"_source": [
"id"
],
"from": 0,
"query": {
"function_score": {
"boost_mode": "multiply",
"functions": [
{
"script_score": {
"script": {
"lang": "expression",
"source": "1 + sqrt(doc['n_citation'].value/100)"
}
}
}
],
"query": {
"bool": {
"must_not": [
{
"term": {
"is_deleted": true
}
}
],
"filter": ,
"must": {
"dis_max": {
"queries": [
{
"multi_match": {
"type": "best_fields",
"tie_breaker": 0.2,
"fields": [
"title",
"keywords",
"authors.name",
"venue.raw"
],
"query": "Socio economic Risks of Atypical Employment Relationships: Evidence from the German Labour Market"
}
}
],
"tie_breaker": 0
}
}
}
}
}
},
"size": 20
}

some profile:

  • "time_in_nanos": 5999371167,
  • "breakdown": {
    • "set_min_competitive_score_count": 0,
    • "match_count": 0,
    • "shallow_advance_count": 0,
    • "set_min_competitive_score": 0,
    • "next_doc": 6391125,
    • "match": 0,
    • "next_doc_count": 26434,
    • "score_count": 26434,
    • "compute_max_score_count": 0,
    • "compute_max_score": 0,
    • "advance": 298333781,
    • "advance_count": 19,
    • "score": 25916575,
    • "build_scorer_count": 38,
    • "create_weight": 5615225195,
    • "shallow_advance": 0,
    • "create_weight_count": 1,
    • "build_scorer": 53451565},

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