summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/suggest/completion
diff options
context:
space:
mode:
authorjavanna <cavannaluca@gmail.com>2016-09-13 18:25:33 +0200
committerLuca Cavanna <cavannaluca@gmail.com>2016-09-13 18:25:53 +0200
commite0074ee9d44440affae0ebf30c3172409f1e21f0 (patch)
treea70d0d3a36cff8b696c6973dc7a9e2131006add8 /core/src/main/java/org/elasticsearch/search/suggest/completion
parentafbd7cbeb8e812a892e2b0e6a7d8fd37ecfbcc69 (diff)
[TEST] fix MultiMatchQueryIT random docs generation so that they don't interfere in score tests
When generating random bogus documents, it could happen that they contain both the terms "the" and "ultimate", which would match the query "the ultimate" better than all the other non bogus documents, which would cause testCrossFieldMode to fail. "the" is a term that's relatively likely to be randomly generated given its length; we can simply increase the minimum length of randomly generated terms to 5, so that there are no collisions, as "the" cannot be generated anymore (nor can "ultimate" as the lenght doesn't go up to 8). Also made some assertions more accurate to check how many hits match a query rather than checking only that the first or second hits are there. Closes #18873
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion')
0 files changed, 0 insertions, 0 deletions