Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToParentBlockJoinQuery Explain Support Score Mode #12245

Merged
merged 21 commits into from
May 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b4d27a0
initial commit of score mode explain.
MarcusSorealheis Apr 27, 2023
6f797dc
tidy up.
MarcusSorealheis Apr 27, 2023
2b5e084
tidy a version file that was unmodified.
MarcusSorealheis Apr 27, 2023
dcedc7a
moving to testBlockJoin.
MarcusSorealheis Apr 27, 2023
415fd86
ensure score mode is included in match text.
MarcusSorealheis Apr 27, 2023
daa584c
I think this is closer to the right track. tests won't run on my rig.
MarcusSorealheis Apr 27, 2023
2875366
tidy.
MarcusSorealheis Apr 27, 2023
cb96335
introduce a variable and string template, simplify return.
MarcusSorealheis Apr 27, 2023
40ca854
oops fall through error.
MarcusSorealheis Apr 27, 2023
9e590a0
final failure is comparison between expected value and actual value I…
MarcusSorealheis Apr 27, 2023
41e2600
change data type to match tests, decouple score modes.
MarcusSorealheis Apr 28, 2023
23c8280
all issues resolved except one.
MarcusSorealheis May 1, 2023
26db728
fixing in-progress issues.
MarcusSorealheis May 2, 2023
b19c9f9
adding a total explanation.
MarcusSorealheis May 2, 2023
1fde482
fix the control flow and comment out helpful debug aid for others in …
MarcusSorealheis May 2, 2023
3d23e2e
add min and max.
MarcusSorealheis May 3, 2023
94cb3ac
refactor to use switch statement.
MarcusSorealheis May 4, 2023
824a86e
Adding more support for none and removing score math.
MarcusSorealheis May 4, 2023
d3f413e
Adding a bit if simplicity.
ebs-mkhludnev May 5, 2023
f52ebec
some tidysh
ebs-mkhludnev May 5, 2023
b98018d
restore assert
ebs-mkhludnev May 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,8 @@ public void testRandom() throws Exception {
Explanation explanation = joinS.explain(childJoinQuery, hit.doc);
Document document = joinS.storedFields().document(hit.doc - 1);
int childId = Integer.parseInt(document.get("childID"));
assertEquals(hit.score, explanation.getValue().floatValue(), 0.1f);
assertTrue(explanation.isMatch());
assertEquals(hit.score, explanation.getValue().doubleValue(), 0.0f);
MarcusSorealheis marked this conversation as resolved.
Show resolved Hide resolved
Matcher m =
Pattern.compile(
"Score based on ([0-9]+) child docs in range from ([0-9]+) to ([0-9]+), using score mode (None|Avg|Min|Max|Total)")
Expand Down