[
https://issues.apache.org/jira/browse/LUCENE-7416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436926#comment-15436926
]
Robert Muir commented on LUCENE-7416:
-------------------------------------
Here is the fail I see on 6.x:
{noformat}
[junit4] Started J0 PID(10069@localhost).
[junit4] Suite: org.apache.lucene.search.TestBooleanRewrites
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestBooleanRewrites
-Dtests.method=testRandom -Dtests.seed=506700689E36A59D -Dtests.slow=true
-Dtests.locale=sr-ME -Dtests.timezone=Africa/Kinshasa -Dtests.asserts=true
-Dtests.file.encoding=UTF-8
[junit4] FAILURE 0.39s | TestBooleanRewrites.testRandom <<<
[junit4] > Throwable #1: java.lang.AssertionError:
expected:<1.5392522811889648> but was:<1.4700312614440918>
[junit4] > at
__randomizedtesting.SeedInfo.seed([506700689E36A59D:222B25672F5613EE]:0)
[junit4] > at
org.apache.lucene.search.TestBooleanRewrites.assertEquals(TestBooleanRewrites.java:404)
[junit4] > at
org.apache.lucene.search.TestBooleanRewrites.testRandom(TestBooleanRewrites.java:348)
[junit4] > at java.lang.Thread.run(Thread.java:745)
[junit4] 2> NOTE: test params are: codec=Asserting(Lucene62):
{body=PostingsFormat(name=LuceneVarGapFixedInterval)}, docValues:{},
maxPointsInLeafNode=1393, maxMBSortInHeap=5.498728834322439,
sim=ClassicSimilarity, locale=sr-ME, timezone=Africa/Kinshasa
[junit4] 2> NOTE: Linux 4.4.0-31-generic amd64/Oracle Corporation 1.8.0_45
(64-bit)/cpus=8,threads=1,free=225724712,total=239075328
[junit4] 2> NOTE: All tests run in this JVM: [TestBooleanRewrites]
[junit4] Completed [1/1 (1!)] in 0.61s, 1 test, 1 failure <<< FAILURES!
{noformat}
I suspect the change is safe for master branch but requires more work if we
want it to not break scoring with stuff like coord() at play. Additionally
given the optimization is fairly complicated, maybe we can have a few targeted
tests if we really want to push it to 6.x, that would help alleviate some
concerns.
> BooleanQuery rewrite optimizations
> ----------------------------------
>
> Key: LUCENE-7416
> URL: https://issues.apache.org/jira/browse/LUCENE-7416
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Affects Versions: master (7.0)
> Reporter: Spyros Kapnissis
> Priority: Minor
> Fix For: master (7.0), 6.3
>
> Attachments: LUCENE-7146.patch
>
>
> A couple of BooleanQuery rewrites / optimizations.
> First, as discussed on the user group, a BooleanQuery with a query that is
> both a SHOULD and a FILTER can be rewritten as a single MUST query, but care
> must be taken to decrement minShouldMatch by 1.
> Another case is if a query is both required (MUST or FILTER) and MUST_NOT at
> the same time, it can be converted to a MatchNoDocsQuery (although I haven't
> discussed this yet so hopefully I'm not missing something!).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]