diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-01-17 07:41:21 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-01-17 07:41:21 +0000 |
commit | 80342b0feb461c5f96b5d09aba00fc2494b6c5de (patch) | |
tree | 06d3f185a9a8fd0a4437c6cd53eff353a2015f90 /config-model | |
parent | 111335bbcb3b88e94952383e52ba53da592f43d0 (diff) |
generate "jsonstring" as config value
* the backend will in any case treat "xmlstring" and "jsonstring"
as meaning "structured data", but let us get rid of this remnant
from when we put XML data in a summary field.
Diffstat (limited to 'config-model')
6 files changed, 16 insertions, 20 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 83ce2efb801..166ad0da957 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,11 +111,7 @@ public class SummaryClassField { } else if (fval instanceof TensorFieldValue) { return Type.TENSOR; } else if (fieldType instanceof CollectionDataType) { - if (transform != null && transform.equals(SummaryTransform.POSITIONS)) { - return Type.XMLSTRING; - } else { - return Type.JSONSTRING; - } + 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 f5c1d8d8197..0d0580b05ed 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 "xmlstring" + DataType.getArray(DataType.STRING), // will become "jsonstring" 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 e4845c1994e..7a1bcbefc0f 100644 --- a/config-model/src/test/derived/advanced/summary.cfg +++ b/config-model/src/test/derived/advanced/summary.cfg @@ -1,6 +1,6 @@ -defaultsummaryid 1271952241 +defaultsummaryid 673702455 usev8geopositions false -classes[].id 1271952241 +classes[].id 673702455 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 "xmlstring" +classes[].fields[].type "jsonstring" 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 0642382aabe..8ec563f8596 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 1194448774 +defaultsummaryid 1886149151 usev8geopositions false -classes[].id 1194448774 +classes[].id 1886149151 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 "xmlstring" +classes[].fields[].type "jsonstring" classes[].fields[].name "my_pos.distance" classes[].fields[].type "integer" classes[].fields[].name "documentid" classes[].fields[].type "longstring" -classes[].id 890647799 +classes[].id 939841157 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 "xmlstring" +classes[].fields[].type "jsonstring" 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 cd7c295ab11..bab76f0b8d2 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 1727020212 +defaultsummaryid 1110900627 usev8geopositions false -classes[].id 1727020212 +classes[].id 1110900627 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "pos.position" -classes[].fields[].type "xmlstring" +classes[].fields[].type "jsonstring" 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 7b8bf16287f..f59dc9130c5 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 230670304 +defaultsummaryid 1462909474 usev8geopositions false -classes[].id 230670304 +classes[].id 1462909474 classes[].name "default" classes[].omitsummaryfeatures false classes[].fields[].name "pos" classes[].fields[].type "jsonstring" classes[].fields[].name "pos.position" -classes[].fields[].type "xmlstring" +classes[].fields[].type "jsonstring" classes[].fields[].name "pos.distance" classes[].fields[].type "integer" classes[].fields[].name "rankfeatures" |