use of com.yahoo.searchdefinition.document.Ranking in project vespa by vespa-engine.
the class ValidateFieldWithIndexSettingsCreatesIndex method process.
@Override
public void process(boolean validate) {
if (!validate)
return;
Matching defaultMatching = new Matching();
Ranking defaultRanking = new Ranking();
for (SDField field : search.allConcreteFields()) {
if (field.doesIndexing())
continue;
if (field.doesAttributing())
continue;
if (!field.getRanking().equals(defaultRanking))
fail(search, field, "Fields which are not creating an index or attribute can not contain rank settings.");
if (!field.getMatching().equals(defaultMatching))
fail(search, field, "Fields which are not creating an index or attribute can not contain match settings.");
}
}
use of com.yahoo.searchdefinition.document.Ranking in project vespa by vespa-engine.
the class AttributeFields method deriveAttribute.
private void deriveAttribute(ImmutableSDField field, Attribute fieldAttribute) {
Attribute attribute = getAttribute(fieldAttribute.getName());
if (attribute == null) {
attributes.put(fieldAttribute.getName(), fieldAttribute);
attribute = getAttribute(fieldAttribute.getName());
}
Ranking ranking = field.getRanking();
if (ranking != null && ranking.isFilter()) {
attribute.setEnableBitVectors(true);
attribute.setEnableOnlyBitVector(true);
}
}