diff options
Diffstat (limited to 'container-search')
5 files changed, 17 insertions, 5 deletions
diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json index 3471ba4c459..753f5b0f58d 100644 --- a/container-search/abi-spec.json +++ b/container-search/abi-spec.json @@ -720,7 +720,6 @@ "public static final enum com.yahoo.prelude.query.Item$ItemType WORD", "public static final enum com.yahoo.prelude.query.Item$ItemType INT", "public static final enum com.yahoo.prelude.query.Item$ItemType PHRASE", - "public static final enum com.yahoo.prelude.query.Item$ItemType PAREN", "public static final enum com.yahoo.prelude.query.Item$ItemType PREFIX", "public static final enum com.yahoo.prelude.query.Item$ItemType SUBSTRING", "public static final enum com.yahoo.prelude.query.Item$ItemType NEAR", @@ -8674,4 +8673,4 @@ ], "fields": [] } -}
\ No newline at end of file +} diff --git a/container-search/src/main/java/com/yahoo/prelude/query/Item.java b/container-search/src/main/java/com/yahoo/prelude/query/Item.java index 670983f0cd7..41d897b8d83 100644 --- a/container-search/src/main/java/com/yahoo/prelude/query/Item.java +++ b/container-search/src/main/java/com/yahoo/prelude/query/Item.java @@ -39,7 +39,7 @@ public abstract class Item implements Cloneable { WORD(4), INT(5), PHRASE(6), - PAREN(7), // TODO not used - remove on Vespa 8 + // 7 was PAREN, unused in Vespa 7 PREFIX(8), SUBSTRING(9), NEAR(11), diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistry.java b/container-search/src/main/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistry.java index 72b489e3ca9..39ec3e1c647 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistry.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfileRegistry.java @@ -32,7 +32,7 @@ public class CompiledQueryProfileRegistry extends ComponentRegistry<CompiledQuer public CompiledQueryProfileRegistry(QueryProfilesConfig config, Executor executor) { QueryProfileRegistry registry = QueryProfileConfigurer.createFromConfig(config); typeRegistry = registry.getTypeRegistry(); - int maxConcurrent = Math.max(1, (int)(Runtime.getRuntime().availableProcessors() * 0.20)); + int maxConcurrent = 1; // TODO hold this one after Concurrency issue has been found: Math.max(1, (int)(Runtime.getRuntime().availableProcessors() * 0.20)); BlockingQueue<CompiledQueryProfile> doneQ = new LinkedBlockingQueue<>(); int started = 0; int completed = 0; diff --git a/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java b/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java index f6273fdf723..312fe175270 100644 --- a/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java @@ -2,6 +2,7 @@ package com.yahoo.search.test; import com.yahoo.component.chain.Chain; +import com.yahoo.data.JsonProducer; import com.yahoo.language.Language; import com.yahoo.language.Linguistics; import com.yahoo.language.detect.Detection; @@ -15,6 +16,7 @@ import com.yahoo.prelude.Index; import com.yahoo.prelude.IndexFacts; import com.yahoo.prelude.IndexModel; import com.yahoo.prelude.SearchDefinition; +import com.yahoo.prelude.fastsearch.FastHit; import com.yahoo.prelude.query.AndItem; import com.yahoo.prelude.query.AndSegmentItem; import com.yahoo.prelude.query.CompositeItem; @@ -40,6 +42,7 @@ import com.yahoo.search.query.profile.types.QueryProfileType; import com.yahoo.search.result.Hit; import com.yahoo.search.searchchain.Execution; import com.yahoo.yolean.Exceptions; +import org.json.JSONObject; import org.junit.Ignore; import org.junit.Test; @@ -69,6 +72,17 @@ import static org.junit.Assert.fail; public class QueryTestCase { @Test + public void testIt() throws Exception { + JSONObject newroot = new JSONObject("{\"key\": 3}"); + var hit = new FastHit(); + hit.setField("data", (JsonProducer)s -> s.append(newroot)); + var field = hit.getField("data"); + if (field instanceof JsonProducer) { + System.out.println((((JsonProducer) field).toJson())); + } + } + + @Test public void testSimpleFunctionality() { Query q = new Query(QueryTestCase.httpEncode("/sdfsd.html?query=this is a simple query&aParameter")); assertEquals("this is a simple query", q.getModel().getQueryString()); diff --git a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java index cc70f46fca1..1d07cafeda9 100644 --- a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java +++ b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java @@ -243,7 +243,6 @@ public class VdsVisitorTestCase { assertEquals(DocumentProtocol.Priority.VERY_HIGH, params.getPriority()); } } - assertEquals(-1, params.getMaxFirstPassHits()); if (qa.maxBucketsPerVisitor != 0) { assertEquals(qa.maxBucketsPerVisitor, params.getMaxBucketsPerVisitor()); } else { |