diff options
Diffstat (limited to 'config-model/src')
3 files changed, 255 insertions, 0 deletions
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index 4be95f33d19..3cffd623acb 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -299,6 +299,7 @@ TOKEN : | < HNSW: "hnsw" > | < MAX_LINKS_PER_NODE: "max-links-per-node" > | < DOUBLE_KEYWORD: "double" > +| < FLOAT_KEYWORD: "float" > | < LONG_KEYWORD: "long" > | < STRING_KEYWORD: "string" > | < DISTANCE_METRIC: "distance-metric" > @@ -2054,6 +2055,11 @@ InputType valueType(Reference reference) : deployLogger.logApplicationPackage(Level.WARNING, "Input " + reference + ": 'long' is not possible, treated as 'double'"); } ) | + ( <FLOAT_KEYWORD> { + result = new InputType(TensorType.empty, false); + deployLogger.logApplicationPackage(Level.WARNING, "Input " + reference + ": 'float' is not possible, treated as 'double'"); + } ) + | ( <STRING_KEYWORD> { result = new InputType(TensorType.empty, true); } ) ) { return result; } @@ -2721,6 +2727,7 @@ String identifier() : { } | <DIVERSITY> | <DOCUMENT> | <DOUBLE_KEYWORD> + | <FLOAT_KEYWORD> | <LONG_KEYWORD> | <STRING_KEYWORD> | <DYNAMIC> diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankingexpression/rankexpression.sd index 76672906252..1f0f8a39c82 100644 --- a/config-model/src/test/derived/rankingexpression/rankexpression.sd +++ b/config-model/src/test/derived/rankingexpression/rankexpression.sd @@ -510,6 +510,8 @@ schema rankexpression { rank-profile withstringcompare { inputs { query(myquerystring) string + query(mybadlong) long + query(mybadfloat) float } first-phase { expression: if (attribute(surl) == query(myquerystring), 0.75, 0.25) diff --git a/config-model/src/test/derived/rankingexpression/schema-info.cfg b/config-model/src/test/derived/rankingexpression/schema-info.cfg new file mode 100644 index 00000000000..5bf01f10ede --- /dev/null +++ b/config-model/src/test/derived/rankingexpression/schema-info.cfg @@ -0,0 +1,246 @@ +schema[].name "rankexpression" +schema[].field[].name "nrtgmp" +schema[].field[].type "double" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "glmpfw" +schema[].field[].type "double" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "artist" +schema[].field[].type "string" +schema[].field[].attribute false +schema[].field[].index true +schema[].field[].name "title" +schema[].field[].type "string" +schema[].field[].attribute false +schema[].field[].index true +schema[].field[].name "surl" +schema[].field[].type "string" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "year" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "foo1" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "foo2" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "foo3" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "foo4" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "bar1" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "bar2" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "bar3" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "bar4" +schema[].field[].type "int" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "t1" +schema[].field[].type "tensor(m{},v[3])" +schema[].field[].attribute true +schema[].field[].index false +schema[].field[].name "labels" +schema[].field[].type "array<string>" +schema[].field[].attribute true +schema[].field[].index false +schema[].fieldset[].name "[document]" +schema[].fieldset[].field[] "artist" +schema[].fieldset[].field[] "bar1" +schema[].fieldset[].field[] "bar2" +schema[].fieldset[].field[] "bar3" +schema[].fieldset[].field[] "bar4" +schema[].fieldset[].field[] "foo1" +schema[].fieldset[].field[] "foo2" +schema[].fieldset[].field[] "foo3" +schema[].fieldset[].field[] "foo4" +schema[].fieldset[].field[] "glmpfw" +schema[].fieldset[].field[] "labels" +schema[].fieldset[].field[] "nrtgmp" +schema[].fieldset[].field[] "surl" +schema[].fieldset[].field[] "t1" +schema[].fieldset[].field[] "title" +schema[].fieldset[].field[] "year" +schema[].summaryclass[].name "default" +schema[].summaryclass[].fields[].name "artist" +schema[].summaryclass[].fields[].type "longstring" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "title" +schema[].summaryclass[].fields[].type "longstring" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "surl" +schema[].summaryclass[].fields[].type "longstring" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "year" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "rankfeatures" +schema[].summaryclass[].fields[].type "featuredata" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "summaryfeatures" +schema[].summaryclass[].fields[].type "featuredata" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "documentid" +schema[].summaryclass[].fields[].type "longstring" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].name "attributeprefetch" +schema[].summaryclass[].fields[].name "nrtgmp" +schema[].summaryclass[].fields[].type "double" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "glmpfw" +schema[].summaryclass[].fields[].type "double" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "surl" +schema[].summaryclass[].fields[].type "longstring" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "year" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "foo1" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "foo2" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "foo3" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "foo4" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "bar1" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "bar2" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "bar3" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "bar4" +schema[].summaryclass[].fields[].type "integer" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "rankfeatures" +schema[].summaryclass[].fields[].type "featuredata" +schema[].summaryclass[].fields[].dynamic false +schema[].summaryclass[].fields[].name "summaryfeatures" +schema[].summaryclass[].fields[].type "featuredata" +schema[].summaryclass[].fields[].dynamic false +schema[].rankprofile[].name "default" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures true +schema[].rankprofile[].name "unranked" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "static" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "overflow" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "duplicates" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "whitespace1" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "whitespace2" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros2" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros3" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros3-inherited" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-inherited" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-inherited2" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-inherited3" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-refering-macros" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-refering-macros-inherited" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-refering-macros-inherited2" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "macros-refering-macros-inherited-two-levels" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "withmf" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "withboolean" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "withglobalphase" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "layered" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].input[].name "query(v)" +schema[].rankprofile[].input[].type "tensor(v[3])" +schema[].rankprofile[].name "withtfl" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].input[].name "query(v)" +schema[].rankprofile[].input[].type "tensor(v[3])" +schema[].rankprofile[].name "withtfl2" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].input[].name "query(v)" +schema[].rankprofile[].input[].type "tensor(v[3])" +schema[].rankprofile[].name "withnorm" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "withfusion" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "function-with-arg-as-summary-feature" +schema[].rankprofile[].hasSummaryFeatures true +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "function-with-arg-in-global-phase" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].name "withstringcompare" +schema[].rankprofile[].hasSummaryFeatures false +schema[].rankprofile[].hasRankFeatures false +schema[].rankprofile[].input[].name "query(myquerystring)" +schema[].rankprofile[].input[].type "string" +schema[].rankprofile[].input[].name "query(mybadlong)" +schema[].rankprofile[].input[].type "tensor()" +schema[].rankprofile[].input[].name "query(mybadfloat)" +schema[].rankprofile[].input[].type "tensor()" |