aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2023-09-25 09:40:19 +0200
committerGitHub <noreply@github.com>2023-09-25 09:40:19 +0200
commit2f9bf822d9817a24ef070b7e69e3cbc429d43338 (patch)
tree9bbdcc358753c3de9a5d080dd3850362cc104156 /container-search
parente0db4153b7698cbbf61253dbe6808748c89e539f (diff)
parent297b712e37a889b824f5b1ef241379d67d045ecd (diff)
Merge pull request #28623 from vespa-engine/bratseth/dynamic-summary-ngram-fields
Bratseth/dynamic summary ngram fields
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java4
-rw-r--r--container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java
index 3edad64f9f2..3dfa278662d 100644
--- a/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java
@@ -135,14 +135,14 @@ public class NGramSearcher extends Searcher {
* Creates the root of the query subtree which will contain the grams to match,
* called by {@link #splitToGrams}. This hook is provided to make it easy to create a subclass which
* matches grams using a different composite item, e.g an OrItem.
- * <p>
+ *
* This default implementation returns createGramRoot(query).
*
* @param term the term item this gram root is replacing in the query tree,
* typically used to access the index name of the term when that is required by the new gram root
* (such as in PhraseItem)
* @param query the input query, to make it possible to return a different composite item type
- * depending on the query content
+ * depending on the query content
* @return the composite item to add the gram items to in {@link #splitToGrams}
*/
protected CompositeItem createGramRoot(HasIndexItem term, Query query) {
diff --git a/container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java b/container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java
index 49449153d1f..4d25ebdccff 100644
--- a/container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java
@@ -334,15 +334,15 @@ public class NGramSearcherTestCase {
Result r = new Execution(new Chain<>(createSearcher(), new MockBackend1()), createContextStub(createIndexFacts())).search(q);
Hit h1 = r.hits().get("hit1");
assertEquals("Should be untouched,\u001feven if containing \u001f",
- h1.getField("test").toString());
+ h1.getField("test").toString());
assertTrue(h1.getField("test") instanceof String);
assertEquals("Blue red Ed A", h1.getField("gram2").toString());
assertTrue(h1.getField("gram2") instanceof XMLString);
assertEquals("Blue red ed a\u001f",
- h1.getField("gram3").toString(),
- "Separators on borders work");
+ h1.getField("gram3").toString(),
+ "Separators on borders work");
assertTrue(h1.getField("gram3") instanceof String);
Hit h2 = r.hits().get("hit2");
@@ -352,7 +352,7 @@ public class NGramSearcherTestCase {
Hit h3 = r.hits().get("hit3");
assertEquals("\u001ffin\u001f \u001fen\u001f \u001fa\u001f", h3.getField("gram2").toString());
assertEquals("#Logging in #Java is like that \"Judean P\u001fopul\u001far Front\" scene from \"Life of Brian\".",
- h3.getField("gram3").toString());
+ h3.getField("gram3").toString());
}
private Item parseQuery(String query, Query.Type type) {