summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2024-01-12 18:43:13 +0100
committerJon Bratseth <bratseth@vespa.ai>2024-01-12 18:43:13 +0100
commiteb79e9b1b567ca1b2b0863777c1cf47ee191216e (patch)
tree689247eba83cf1e209e8e5cc3a0e441832f636dc /config-model
parent0213cea0df0706a1f1a70c44e8c2b5906745a6ab (diff)
Support parameter references in embed
Support embed(@myParameter) in addition to embed('text to embed')
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java b/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java
index c959634019d..c58d8fc74d5 100644
--- a/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java
@@ -1,11 +1,17 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
+import com.yahoo.document.Document;
import com.yahoo.schema.document.Stemming;
import com.yahoo.schema.parser.ParseException;
import com.yahoo.schema.processing.ImportedFieldsResolver;
import com.yahoo.schema.processing.OnnxModelTypeResolver;
import com.yahoo.vespa.documentmodel.DocumentSummary;
+import com.yahoo.vespa.indexinglanguage.expressions.AttributeExpression;
+import com.yahoo.vespa.indexinglanguage.expressions.Expression;
+import com.yahoo.vespa.indexinglanguage.expressions.InputExpression;
+import com.yahoo.vespa.indexinglanguage.expressions.ScriptExpression;
+import com.yahoo.vespa.indexinglanguage.expressions.StatementExpression;
import com.yahoo.vespa.model.test.utils.DeployLoggerStub;
import org.junit.jupiter.api.Test;
@@ -20,6 +26,20 @@ import static org.junit.jupiter.api.Assertions.*;
public class SchemaTestCase {
@Test
+ public void documentIdCanBeIndexed() throws ParseException {
+ String schema = """
+ schema test {
+ document test {
+ }
+ field id type string {
+ indexing: input documentid | attribute | summary
+ }
+ }
+ """;
+ ApplicationBuilder.createFromStrings(new DeployLoggerStub(), schema);
+ }
+
+ @Test
void testValidationOfInheritedSchema() throws ParseException {
try {
String schema = joinLines(