diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-29 11:22:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 11:22:47 +0100 |
commit | 5cb965432c724f08ccb149f6b8901f695b907c8f (patch) | |
tree | 4e6e5114f9c2f89ed2e26485bcafac8ead682727 /config-model/src/test/java/com/yahoo | |
parent | 83096e38fcfdf9fa8af28cd0de7dd8183ddf13e9 (diff) | |
parent | 84d51ea72e5684c715c7cec89215ce7ada1ab363 (diff) |
Merge pull request #30405 from vespa-engine/arnej/rewrite-zcurve-streaming
drop conversion to zcurve attribute for streaming
Diffstat (limited to 'config-model/src/test/java/com/yahoo')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/derived/IndexingScriptTestCase.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/IndexingScriptTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/IndexingScriptTestCase.java index 6bfb67b3011..a35dda28e16 100644 --- a/config-model/src/test/java/com/yahoo/schema/derived/IndexingScriptTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/derived/IndexingScriptTestCase.java @@ -40,4 +40,23 @@ public class IndexingScriptTestCase { verifyIndexingScript(false); verifyIndexingScript(true); } + + private void verifyZcurveScript(boolean isStreaming) { + VespaModel model = IndexInfoTestCase.createModel(TEST, + """ + field f type position { indexing: attribute } + """); + Schema schema = model.getSearchClusters().get(0).schemas().get(TEST).fullSchema(); + IlscriptsConfig cfg = ilscriptsConfig(schema, isStreaming); + assertEquals(1, cfg.ilscript().size()); + assertEquals(1, cfg.ilscript(0).content().size()); + String exp_f = isStreaming ? "attribute f" : "zcurve | attribute f_zcurve"; + assertEquals("clear_state | guard { input f | " + exp_f + "; }", cfg.ilscript(0).content(0)); + } + + @Test + void testThatZcurveIsRewrittenFromStreaming() { + verifyZcurveScript(false); + verifyZcurveScript(true); + } } |