diff options
10 files changed, 62 insertions, 8 deletions
diff --git a/config-model/src/test/derived/attributes/attributes.cfg b/config-model/src/test/derived/attributes/attributes.cfg index b29f0494fec..cbc3280f213 100644 --- a/config-model/src/test/derived/attributes/attributes.cfg +++ b/config-model/src/test/derived/attributes/attributes.cfg @@ -510,6 +510,38 @@ attribute[].index.hnsw.maxlinkspernode 16 attribute[].index.hnsw.neighborstoexploreatinsert 200 attribute[].index.hnsw.distancemetric EUCLIDEAN attribute[].index.hnsw.multithreadedindexing true +attribute[].name "a13" +attribute[].datatype TENSOR +attribute[].collectiontype SINGLE +attribute[].dictionary.type BTREE +attribute[].dictionary.match UNCASED +attribute[].match UNCASED +attribute[].removeifzero false +attribute[].createifnonexistent false +attribute[].fastsearch true +attribute[].huge false +attribute[].paged false +attribute[].ismutable false +attribute[].sortascending true +attribute[].sortfunction UCA +attribute[].sortstrength PRIMARY +attribute[].sortlocale "" +attribute[].enablebitvectors false +attribute[].enableonlybitvector false +attribute[].fastaccess false +attribute[].arity 8 +attribute[].lowerbound -9223372036854775808 +attribute[].upperbound 9223372036854775807 +attribute[].densepostinglistthreshold 0.4 +attribute[].tensortype "tensor(x{})" +attribute[].imported false +attribute[].maxuncommittedmemory 77777 +attribute[].distancemetric EUCLIDEAN +attribute[].index.hnsw.enabled false +attribute[].index.hnsw.maxlinkspernode 16 +attribute[].index.hnsw.neighborstoexploreatinsert 200 +attribute[].index.hnsw.distancemetric EUCLIDEAN +attribute[].index.hnsw.multithreadedindexing true attribute[].name "a7_arr" attribute[].datatype STRING attribute[].collectiontype ARRAY diff --git a/config-model/src/test/derived/attributes/attributes.sd b/config-model/src/test/derived/attributes/attributes.sd index 3dfce32e22d..f38087fbc6f 100644 --- a/config-model/src/test/derived/attributes/attributes.sd +++ b/config-model/src/test/derived/attributes/attributes.sd @@ -102,6 +102,11 @@ search attributes { rank: filter } + field a13 type tensor(x{}) { + indexing: attribute + attribute: fast-rank + } + } field a7_arr type array<string> { diff --git a/config-model/src/test/derived/attributes/ilscripts.cfg b/config-model/src/test/derived/attributes/ilscripts.cfg index 536394ab11d..42fda653618 100644 --- a/config-model/src/test/derived/attributes/ilscripts.cfg +++ b/config-model/src/test/derived/attributes/ilscripts.cfg @@ -20,6 +20,7 @@ ilscript[].docfield[] "a9" ilscript[].docfield[] "a10" ilscript[].docfield[] "a11" ilscript[].docfield[] "a12" +ilscript[].docfield[] "a13" ilscript[].content[] "clear_state | guard { input a7 | split \";\" | attribute a7_arr; }" ilscript[].content[] "clear_state | guard { input a8 | split \";\" | attribute a8_arr; }" ilscript[].content[] "clear_state | guard { input a1 | attribute a1 | summary a1; }" @@ -41,3 +42,4 @@ ilscript[].content[] "clear_state | guard { input a9 | attribute a9; }" ilscript[].content[] "clear_state | guard { input a10 | attribute a10; }" ilscript[].content[] "clear_state | guard { input a11 | attribute a11; }" ilscript[].content[] "clear_state | guard { input a12 | attribute a12; }" +ilscript[].content[] "clear_state | guard { input a13 | attribute a13; }" diff --git a/config-model/src/test/derived/attributes/index-info.cfg b/config-model/src/test/derived/attributes/index-info.cfg index aa400c7de0a..9aeb79a7e2d 100644 --- a/config-model/src/test/derived/attributes/index-info.cfg +++ b/config-model/src/test/derived/attributes/index-info.cfg @@ -169,6 +169,14 @@ indexinfo[].command[].indexname "a12" indexinfo[].command[].command "numerical" indexinfo[].command[].indexname "a12" indexinfo[].command[].command "type int" +indexinfo[].command[].indexname "a13" +indexinfo[].command[].command "index" +indexinfo[].command[].indexname "a13" +indexinfo[].command[].command "attribute" +indexinfo[].command[].indexname "a13" +indexinfo[].command[].command "type tensor(x{})" +indexinfo[].command[].indexname "a13" +indexinfo[].command[].command "word" indexinfo[].command[].indexname "a7_arr" indexinfo[].command[].command "index" indexinfo[].command[].indexname "a7_arr" diff --git a/config-model/src/test/derived/attributes/summarymap.cfg b/config-model/src/test/derived/attributes/summarymap.cfg index a96f1e3858d..78bf22b7109 100644 --- a/config-model/src/test/derived/attributes/summarymap.cfg +++ b/config-model/src/test/derived/attributes/summarymap.cfg @@ -50,3 +50,6 @@ override[].arguments "a11" override[].field "a12" override[].command "attribute" override[].arguments "a12" +override[].field "a13" +override[].command "attribute" +override[].arguments "a13" diff --git a/config-model/src/test/derived/function_arguments/attributes.cfg b/config-model/src/test/derived/function_arguments/attributes.cfg index 17ce5146ce2..8320063ab66 100644 --- a/config-model/src/test/derived/function_arguments/attributes.cfg +++ b/config-model/src/test/derived/function_arguments/attributes.cfg @@ -38,7 +38,7 @@ attribute[].dictionary.match UNCASED attribute[].match UNCASED attribute[].removeifzero false attribute[].createifnonexistent false -attribute[].fastsearch true +attribute[].fastsearch false attribute[].huge false attribute[].paged false attribute[].ismutable false @@ -70,7 +70,7 @@ attribute[].dictionary.match UNCASED attribute[].match UNCASED attribute[].removeifzero false attribute[].createifnonexistent false -attribute[].fastsearch true +attribute[].fastsearch false attribute[].huge false attribute[].paged false attribute[].ismutable false diff --git a/config-model/src/test/derived/function_arguments/test.sd b/config-model/src/test/derived/function_arguments/test.sd index dd57f423c8d..a502c25adb0 100644 --- a/config-model/src/test/derived/function_arguments/test.sd +++ b/config-model/src/test/derived/function_arguments/test.sd @@ -7,11 +7,9 @@ search args { } field t1 type tensor<float>(x{}) { indexing: attribute | summary - attribute: fast-search } field t2 type tensor<float>(x{}) { indexing: attribute | summary - attribute: fast-rank } } diff --git a/config-model/src/test/derived/function_arguments_with_expressions/attributes.cfg b/config-model/src/test/derived/function_arguments_with_expressions/attributes.cfg index 8aef095a87d..8bcad42c882 100644 --- a/config-model/src/test/derived/function_arguments_with_expressions/attributes.cfg +++ b/config-model/src/test/derived/function_arguments_with_expressions/attributes.cfg @@ -6,7 +6,7 @@ attribute[].dictionary.match UNCASED attribute[].match UNCASED attribute[].removeifzero false attribute[].createifnonexistent false -attribute[].fastsearch true +attribute[].fastsearch false attribute[].huge false attribute[].paged false attribute[].ismutable false @@ -38,7 +38,7 @@ attribute[].dictionary.match UNCASED attribute[].match UNCASED attribute[].removeifzero false attribute[].createifnonexistent false -attribute[].fastsearch true +attribute[].fastsearch false attribute[].huge false attribute[].paged false attribute[].ismutable false diff --git a/config-model/src/test/derived/function_arguments_with_expressions/test.sd b/config-model/src/test/derived/function_arguments_with_expressions/test.sd index 7ded551a0d1..a4d3d5bfdae 100644 --- a/config-model/src/test/derived/function_arguments_with_expressions/test.sd +++ b/config-model/src/test/derived/function_arguments_with_expressions/test.sd @@ -4,11 +4,9 @@ search test { document test { field i1 type int { indexing: attribute | summary - attribute: fast-search } field t1 type tensor<float>(x{}) { indexing: attribute | summary - attribute: fast-rank } field t2 type tensor<float>(x{}) { indexing: attribute | summary diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java index 9e53bd57d77..b9e6bfe7dc9 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java @@ -128,6 +128,14 @@ public class TensorFieldTestCase { "field t1 type tensor(x{},y{},z[4]) { indexing: attribute \n attribute: fast-search }", "t1").isFastSearch()); } + @Test + public void tensors_with_at_least_one_mapped_dimension_can_be_fast_rank() throws ParseException { + assertTrue(getAttributeFromSd( + "field t1 type tensor(x{}) { indexing: attribute \n attribute: fast-rank }", "t1").isFastRank()); + assertTrue(getAttributeFromSd( + "field t1 type tensor(x{},y{},z[4]) { indexing: attribute \n attribute: fast-rank }", "t1").isFastRank()); + } + private static String getSd(String field) { return joinLines("search test {", " document test {", |