public class FieldQuery extends Query
Query.ForEachQueryNode, Query.QTPBuilder, Query.QueryTermsParameter
Constructor and Description |
---|
FieldQuery()
An empty default constructor
|
FieldQuery(Query q)
Constructs a field query from the given query.
|
FieldQuery(Query q,
String f)
Constructs a field query from the given query and
the given field.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deep Clone this object
|
String |
getField()
Gets the field that the query term should appear.
|
void |
getTermsOf(Class<? extends Query> c,
List<Query> alist,
boolean req)
Returns all the query terms, in subqueries that
are instances of a given class
|
boolean |
obtainControls(Set<String> allowed,
Map<String,String> controls)
Checks to see if field name is a valid control name, as specified by
allowed, and if so adds it to the controls table and returns true to
specify that this Query object is now dead.
|
void |
obtainQueryTerms(MatchingQueryTerms terms,
String field,
Boolean required,
Double weight) |
void |
obtainQueryTerms(Query.QueryTermsParameter parameters) |
String |
parseTree()
Returns the parse tree for the query as a string
|
void |
setField(String f)
Sets the value of the field.
|
String |
toString()
Returns a string representation of the query.
|
apply, applyTermPipeline, getTerms, obtainAllOf, setChild
public FieldQuery()
public FieldQuery(Query q)
q
- the query that is qualified with the field operator.public String getField()
public void setField(String f)
f
- String the value of the field.public String toString()
public void obtainQueryTerms(MatchingQueryTerms terms, String field, Boolean required, Double weight)
obtainQueryTerms
in class Query
public void obtainQueryTerms(Query.QueryTermsParameter parameters)
obtainQueryTerms
in class Query
public boolean obtainControls(Set<String> allowed, Map<String,String> controls)
obtainControls
in class Query
allowed
- A hashset of lowercase control names that may be set by user queries.controls
- The hashtable to add the found controls topublic void getTermsOf(Class<? extends Query> c, List<Query> alist, boolean req)
getTermsOf
in class Query
c
- Class a class of queries.alist
- ArrayList the list of query terms.req
- boolean indicates whether the subqueries
are required or not.Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow