se.l4.silo.search.query.ConstantScoreQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of silo-search-api Show documentation
Show all versions of silo-search-api Show documentation
API for Lucene-based querying for Silo.
package se.l4.silo.search.query;
import se.l4.silo.search.QueryCriteriaBuilder;
import se.l4.silo.search.QueryItem;
import se.l4.silo.search.QueryPart;
public class ConstantScoreQuery
extends AbstractQueryPart
implements QueryCriteriaBuilder
{
private final float score;
public ConstantScoreQuery(float score)
{
this.score = score;
}
@Override
public void addQuery(QueryItem item)
{
receiver.addQuery(new QueryItem("constantScore", new ConstantScoreData(score, item)));
}
@Override
public > P query(P q)
{
q.parent(parent, this);
return q;
}
}