aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/derived
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-05 16:32:06 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-05 16:32:06 +0100
commit5fb35b0e41b0f62d9b66fd9c4fcee23f82a8400f (patch)
tree2251e2834e221a043051601d06d8f0853ecb587b /config-model/src/main/java/com/yahoo/schema/derived
parent7d01c3127e49f7ee9af5d5506d4dcfd4fa916498 (diff)
No normalization should take place for streaming search. This is handled symmetrically in the backend during query time.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/derived')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java6
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java8
2 files changed, 8 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
index 1c3c088e1fc..7f874d04f13 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
@@ -55,7 +55,7 @@ public class DerivedConfiguration implements AttributesConfig.Producer {
}
DerivedConfiguration(Schema schema, RankProfileRegistry rankProfileRegistry, QueryProfileRegistry queryProfiles) {
- this(schema, new DeployState.Builder().rankProfileRegistry(rankProfileRegistry).queryProfiles(queryProfiles).build());
+ this(schema, new DeployState.Builder().rankProfileRegistry(rankProfileRegistry).queryProfiles(queryProfiles).build(), false);
}
/**
@@ -65,7 +65,7 @@ public class DerivedConfiguration implements AttributesConfig.Producer {
* argument is live. Which means that this object will be inconsistent if the given
* schema is later modified.
*/
- public DerivedConfiguration(Schema schema, DeployState deployState) {
+ public DerivedConfiguration(Schema schema, DeployState deployState, boolean isStreaming) {
try {
Validator.ensureNotNull("Schema", schema);
this.schema = schema;
@@ -81,7 +81,7 @@ public class DerivedConfiguration implements AttributesConfig.Producer {
juniperrc = new Juniperrc(schema);
rankProfileList = new RankProfileList(schema, schema.rankExpressionFiles(), attributeFields, deployState);
indexingScript = new IndexingScript(schema);
- indexInfo = new IndexInfo(schema);
+ indexInfo = new IndexInfo(schema, isStreaming);
schemaInfo = new SchemaInfo(schema, deployState.rankProfileRegistry(), summaries);
indexSchema = new IndexSchema(schema);
importedFields = new ImportedFields(schema);
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
index 96c64ff1a1c..7532dec5187 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
@@ -55,12 +55,14 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer {
private static final String CMD_INTEGER = "integer";
private static final String CMD_STRING = "string";
private static final String CMD_PHRASE_SEGMENTING = "phrase-segmenting";
+ private final boolean isStreaming;
private final Set<IndexCommand> commands = new java.util.LinkedHashSet<>();
private final Map<String, String> aliases = new java.util.LinkedHashMap<>();
private final Map<String, FieldSet> fieldSets;
private Schema schema;
- public IndexInfo(Schema schema) {
+ public IndexInfo(Schema schema, boolean isStreaming) {
+ this.isStreaming = isStreaming;
this.fieldSets = schema.fieldSets().userFieldSets();
addIndexCommand("sddocname", CMD_INDEX);
addIndexCommand("sddocname", CMD_WORD);
@@ -223,7 +225,7 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer {
}
private boolean normalizeAccents(ImmutableSDField field) {
- return field.getNormalizing().doRemoveAccents() && isTypeOrNested(field, DataType.STRING);
+ return !isStreaming && field.getNormalizing().doRemoveAccents() && isTypeOrNested(field, DataType.STRING);
}
private boolean isTypeOrNested(ImmutableSDField field, DataType type) {
@@ -370,7 +372,7 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer {
anyStemming = true;
stemmingCommand = CMD_STEM + ":" + getEffectiveStemming(field).toStemMode();
}
- if (field.getNormalizing().doRemoveAccents()) {
+ if (normalizeAccents(field)) {
anyNormalizing = true;
}
if (isTypeOrNested(field, DataType.STRING)) {