Skip to content
Permalink
Browse files
OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test co… (
#469)

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage: remove some unsupported query test

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage: fix case insensitive query for dynamicBoostLite and adding tests

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage: fix dynamic boost lite query with space issue, explained as OR

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage: fix DynamicBoostLite to make it fully support the lucene fulltext query syntax

* OAK-9671 Increase dynamicBoost and dynamicBoostLite full-text test coverage: clean up tests
  • Loading branch information
FrancoisZhang committed Feb 4, 2022
1 parent 55f95f2 commit a87a66322f536832863fce2615fd55d80c9d0f75
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 101 deletions.
@@ -90,7 +90,7 @@ public IndexFieldProvider getIndexFieldProvider(String nodeType) {
}

@NotNull
FulltextQueryTermsProvider getFulltextQueryTermsProvider(String nodeType) {
public FulltextQueryTermsProvider getFulltextQueryTermsProvider(String nodeType) {
FulltextQueryTermsProvider provider = fulltextQueryTermsProviderMap.get(nodeType);
return (provider != null) ? provider : FulltextQueryTermsProvider.DEFAULT;
}
@@ -25,6 +25,7 @@
import java.util.Collection;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -1552,7 +1553,7 @@ private static Query tokenToQuery(String text, String fieldName, PlanResult pr,
if (FieldNames.FULLTEXT.equals(fieldName)) {
Query subQuery = new BooleanQuery();
if (pr.indexDefinition.isDynamicBoostLiteEnabled()) {
subQuery = new TermQuery(new Term(FieldNames.SIMILARITY_TAGS, text));
subQuery = tokenToQuery(text, FieldNames.SIMILARITY_TAGS, analyzer);
} else if (augmentor != null) {
subQuery = augmentor.getQueryTerm(text, analyzer, pr.indexDefinition.getDefinitionNodeState());
}

0 comments on commit a87a663

Please sign in to comment.