Class QualityQuery
- java.lang.Object
-
- org.apache.lucene.benchmark.quality.QualityQuery
-
- All Implemented Interfaces:
Comparable<QualityQuery>
public class QualityQuery extends Object implements Comparable<QualityQuery>
A QualityQuery has an ID and some name-value pairs.The ID allows to map the quality query with its judgements.
The name-value pairs are used by a
QualityQueryParserto create a LuceneQuery.It is very likely that name-value-pairs would be mapped into fields in a Lucene query, but it is up to the QualityQueryParser how to map - e.g. all values in a single field, or each pair as its own field, etc., - and this of course must match the way the searched index was constructed.
-
-
Constructor Summary
Constructors Constructor Description QualityQuery(String queryID, Map<String,String> nameValPairs)Create a QualityQuery with given ID and name-value pairs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(QualityQuery other)String[]getNames()Return all the names of name-value-pairs in this QualityQuery.StringgetQueryID()Return the ID of this query.StringgetValue(String name)Return the value of a certain name-value pair.
-
-
-
Method Detail
-
getNames
public String[] getNames()
Return all the names of name-value-pairs in this QualityQuery.
-
getValue
public String getValue(String name)
Return the value of a certain name-value pair.- Parameters:
name- the name whose value should be returned.
-
getQueryID
public String getQueryID()
Return the ID of this query. The ID allows to map the quality query with its judgements.
-
compareTo
public int compareTo(QualityQuery other)
- Specified by:
compareToin interfaceComparable<QualityQuery>
-
-