diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2022-01-18 10:25:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 10:25:34 +0100 |
commit | 50e8dbcd13b3bd8ac817e0cb2151e22944441e8c (patch) | |
tree | e7a3b3b44acf03791e5bdcbb65da252efbb5178b | |
parent | c5975ffb22c0011d12f3aa02c9ad4415d0e0134d (diff) |
Revert "generate "jsonstring" as config value"
6 files changed, 20 insertions, 16 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java index 166ad0da957..83ce2efb801 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java @@ -111,7 +111,11 @@ public class SummaryClassField { } else if (fval instanceof TensorFieldValue) { return Type.TENSOR; } else if (fieldType instanceof CollectionDataType) { - return Type.JSONSTRING; + if (transform != null && transform.equals(SummaryTransform.POSITIONS)) { + return Type.XMLSTRING; + } else { + return Type.JSONSTRING; + } } else if (fieldType instanceof MapDataType) { return Type.JSONSTRING; } else if (fieldType instanceof ReferenceDataType) { diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/CreatePositionZCurve.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/CreatePositionZCurve.java index 0d0580b05ed..f5c1d8d8197 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/CreatePositionZCurve.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/CreatePositionZCurve.java @@ -65,7 +65,7 @@ public class CreatePositionZCurve extends Processor { Collection<String> summaryTo = removeSummaryTo(field); ensureCompatibleSummary(field, zName, PositionDataType.getPositionSummaryFieldName(fieldName), - DataType.getArray(DataType.STRING), // will become "jsonstring" + DataType.getArray(DataType.STRING), // will become "xmlstring" SummaryTransform.POSITIONS, summaryTo, validate); ensureCompatibleSummary(field, zName, PositionDataType.getDistanceSummaryFieldName(fieldName), diff --git a/config-model/src/test/derived/advanced/summary.cfg b/config-model/src/test/derived/advanced/summary.cfg index 7a1bcbefc0f..e4845c1994e 100644 --- a/config-model/src/test/derived/advanced/summary.cfg +++ b/config-model/src/test/derived/advanced/summary.cfg @@ -1,6 +1,6 @@ -defaultsummaryid 673702455 +defaultsummaryid 1271952241 usev8geopositions false -classes[].id 673702455 +classes[].id 1271952241 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "debug" @@ -14,7 +14,7 @@ classes[].fields[].type "longstring" classes[].fields[].name "product3" classes[].fields[].type "longstring" classes[].fields[].name "location.position" -classes[].fields[].type "jsonstring" +classes[].fields[].type "xmlstring" classes[].fields[].name "location.distance" classes[].fields[].type "integer" classes[].fields[].name "mysummary" diff --git a/config-model/src/test/derived/imported_position_field_summary/summary.cfg b/config-model/src/test/derived/imported_position_field_summary/summary.cfg index 8ec563f8596..0642382aabe 100644 --- a/config-model/src/test/derived/imported_position_field_summary/summary.cfg +++ b/config-model/src/test/derived/imported_position_field_summary/summary.cfg @@ -1,6 +1,6 @@ -defaultsummaryid 1886149151 +defaultsummaryid 1194448774 usev8geopositions false -classes[].id 1886149151 +classes[].id 1194448774 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "parent_ref" @@ -12,12 +12,12 @@ classes[].fields[].type "featuredata" classes[].fields[].name "my_pos" classes[].fields[].type "jsonstring" classes[].fields[].name "my_pos.position" -classes[].fields[].type "jsonstring" +classes[].fields[].type "xmlstring" classes[].fields[].name "my_pos.distance" classes[].fields[].type "integer" classes[].fields[].name "documentid" classes[].fields[].type "longstring" -classes[].id 939841157 +classes[].id 890647799 classes[].name "mysummary" classes[].omitsummaryfeatures false classes[].fields[].name "my_pos" @@ -27,7 +27,7 @@ classes[].fields[].type "featuredata" classes[].fields[].name "summaryfeatures" classes[].fields[].type "featuredata" classes[].fields[].name "my_pos.position" -classes[].fields[].type "jsonstring" +classes[].fields[].type "xmlstring" classes[].fields[].name "my_pos.distance" classes[].fields[].type "integer" classes[].id 1274088866 diff --git a/config-model/src/test/derived/position_nosummary/summary.cfg b/config-model/src/test/derived/position_nosummary/summary.cfg index bab76f0b8d2..cd7c295ab11 100644 --- a/config-model/src/test/derived/position_nosummary/summary.cfg +++ b/config-model/src/test/derived/position_nosummary/summary.cfg @@ -1,10 +1,10 @@ -defaultsummaryid 1110900627 +defaultsummaryid 1727020212 usev8geopositions false -classes[].id 1110900627 +classes[].id 1727020212 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "pos.position" -classes[].fields[].type "jsonstring" +classes[].fields[].type "xmlstring" classes[].fields[].name "pos.distance" classes[].fields[].type "integer" classes[].fields[].name "rankfeatures" diff --git a/config-model/src/test/derived/position_summary/summary.cfg b/config-model/src/test/derived/position_summary/summary.cfg index f59dc9130c5..7b8bf16287f 100644 --- a/config-model/src/test/derived/position_summary/summary.cfg +++ b/config-model/src/test/derived/position_summary/summary.cfg @@ -1,12 +1,12 @@ -defaultsummaryid 1462909474 +defaultsummaryid 230670304 usev8geopositions false -classes[].id 1462909474 +classes[].id 230670304 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "pos" classes[].fields[].type "jsonstring" classes[].fields[].name "pos.position" -classes[].fields[].type "jsonstring" +classes[].fields[].type "xmlstring" classes[].fields[].name "pos.distance" classes[].fields[].type "integer" classes[].fields[].name "rankfeatures" |