Re: MaxScoreBulkScorer increased latency for a extreme test case (many SHOULD and each SHOULD clause matches all docs)
Rui Wu <[email protected]> Mon, 16 Sep 2024 13:01:25 -0700
| Newsgroups | gmane.comp.jakarta.lucene.user |
|---|---|
| Message-ID | <CABEQ2euuKd35_8PD59dGvDBxxqWsLsMNThRtK8Jb9SugafcmyA@mail.gmail.com> |
Correction: The index has 3.6 million documents. On Mon, Sep 16, 2024 at 1:00 PM Rui Wu <[email protected]> wrote: > Dear experts, > > In our Mongodb Atlas Search performance regression test between Lucene 9.7 > and Lucene 9.11, we detect a 43% latency regression in this query shape: > 12 SHOULD clause, and each clause matches all of the documents. Each > should clause is wrapped in ConstantScoreQuery. > > The index has 3.6 documents, and every document is identical: Every > document is {"path": ["1", "2", "3" ... "12"]} > The query shape is a BooleanQuery of SHOULD "1", SHOULD "2", ... SHOULD > "12". > > Our flamegraphs show that most of the time in search() is spent on > the MaxScoreBulkScorer class: > [image: image.png] > > We wonder if this extreme test case is expected to be slow on > MaxScoreBulkScorer? > > Thanks a lot! > > Rui Wu > Lead Engineer, MongoDB >