How to disable score calculation to improve performance (fuzzy queries)


I would like to know if there is a way to disable the score calculation in Elasticsearch. I am running match queries with fuzziness 2 and I have noticed (using profile )it consumes a lot of time in build_scorer. In my use case, I don't need the scoring information.

My query:

{"profile": true,"query":{"bool":{"filter":[{"match":{"names":{"query":"name1 name2 name3","operator":"AND","fuzziness":"2","fuzzy_rewrite":"constant_score"}}}]}},"_source":{"includes":["id"]}}

Profile results:

"query": [
                                        "type": "BoostQuery",
                                        "description": "(ConstantScore(+namesCombined:name1~2 +namesCombined:name2~2 +namesCombined:name3~2))^0.0",
                                        "time_in_nanos": 1379850,
                                        "breakdown": {
                                            "set_min_competitive_score_count": 0,
                                            "match_count": 0,
                                            "shallow_advance_count": 0,
                                            "set_min_competitive_score": 0,
                                            "next_doc": 1591,
                                            "match": 0,
                                            "next_doc_count": 1,
                                            "score_count": 1,
                                            "compute_max_score_count": 0,
                                            "compute_max_score": 0,
                                            "advance": 4734,
                                            "advance_count": 1,
                                            "score": 26,
                                            "build_scorer_count": 2,
                                            "create_weight": 7418,
                                            "shallow_advance": 0,
                                            "create_weight_count": 1,
                                            "build_scorer": 1366081

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