aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-09-22 16:53:50 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-09-22 16:53:50 +0200
commit82730b650885f5a1f366980ff7cdf900aa0844ff (patch)
treeb4ff28dd1f80ac54a0b6144d81367887ef30ef9e /container-search
parentad6d36794fe2a51e6f5eacde01eb648d7c76c379 (diff)
Output gram for summary fields where the source is gram
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) {