use of com.yahoo.vespa.model.content.SearchCoverage in project vespa by vespa-engine.
the class DomSearchCoverageBuilder method build.
public static SearchCoverage build(ModelElement contentXml) {
SearchCoverage.Builder builder = new SearchCoverage.Builder();
ModelElement searchElement = contentXml.getChild("search");
if (searchElement == null) {
return builder.build();
}
ModelElement coverageElement = searchElement.getChild("coverage");
if (coverageElement == null) {
return builder.build();
}
builder.setMinimum(coverageElement.childAsDouble("minimum"));
builder.setMinWaitAfterCoverageFactor(coverageElement.childAsDouble("min-wait-after-coverage-factor"));
builder.setMaxWaitAfterCoverageFactor(coverageElement.childAsDouble("max-wait-after-coverage-factor"));
return builder.build();
}
Aggregations