summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/searchdefinition
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-20 10:46:50 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-20 11:01:11 +0200
commita2421d2117acb992615fc8598159219073f31e15 (patch)
tree9b366f3fbe1416c116a5566826230e48ce14540e /config-model/src/main/java/com/yahoo/searchdefinition
parentcf97c2df72bc8aa0bc4d71128d873df835cfd07a (diff)
Properly generate attribute config for streamig search.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java13
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java2
2 files changed, 4 insertions, 11 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java
index 9f9a93caf97..e2e7276b592 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java
@@ -32,13 +32,9 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce
* Flag indicating if a position-attribute has been found
*/
private boolean hasPosition = false;
- private final boolean needOnlyFastAccess;
public AttributeFields(Search search) {
- this(search, false);
- }
- public AttributeFields(Search search, boolean onlyFastAccess) {
- needOnlyFastAccess = onlyFastAccess;
+
derive(search);
}
@@ -87,16 +83,13 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce
*/
private void deriveAttributes(ImmutableSDField field) {
for (Attribute fieldAttribute : field.getAttributes().values()) {
- if (fieldAttribute.isFastAccess() || !needOnlyFastAccess) {
- deriveAttribute(field, fieldAttribute);
- }
+ deriveAttribute(field, fieldAttribute);
}
if (field.containsExpression(ToPositionExpression.class)) {
// TODO: Move this check to processing and remove this
if (hasPosition) {
- throw new IllegalArgumentException("Can not specify more than one " +
- "set of position attributes per " + "field: " + field.getName());
+ throw new IllegalArgumentException("Can not specify more than one set of position attributes per field: " + field.getName());
}
hasPosition = true;
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
index 108715f96fc..59f595ba842 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java
@@ -78,8 +78,8 @@ public class DerivedConfiguration {
}
}
}
- attributeFields = new AttributeFields(search, search.isDocumentsOnly());
if ( ! search.isDocumentsOnly()) {
+ attributeFields = new AttributeFields(search);
summaries = new Summaries(search, deployLogger);
summaryMap = new SummaryMap(search, summaries);
juniperrc = new Juniperrc(search);