Package com.lucidworks.querying.api
Interface QueryRequest
public interface QueryRequest
Fusion query request. Part of the
QueryRequestResponse and populated before the query has been
sent to Solr.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given query parameter with its associated value to the query.voidClear all query parameters from the query.getFirstParam(String param) Retrieve first value associated with the given query parameter.Retrieve the values associated with the given query parameter.booleanWhether the query contains the given parameter.voidremoveParam(String param) Remove any query parameters from the query that match the given query parameter.voidSet the given query parameter with its associated value on the query.
-
Method Details
-
getHttpMethod
String getHttpMethod()- Returns:
- the HTTP method used to send the request to Fusion.
-
getHeaders
Map<String,Collection<String>> getHeaders()- Returns:
- the request headers
-
getParams
Map<String,Collection<String>> getParams()- Returns:
- the map of query parameters.
Certain query parameters may be specified multiple times, e.g.
debug=timing&debug=query&debug=results
-
hasParam
Whether the query contains the given parameter.- Parameters:
param- a query parameter- Returns:
- true if the query contained the given the query parameter
-
getParam
Retrieve the values associated with the given query parameter.- Parameters:
param- a query parameter- Returns:
- the values associated with the given query parameter.
-
getFirstParam
Retrieve first value associated with the given query parameter.- Parameters:
param- a query parameter- Returns:
- first value associated with the given query parameter.
-
addParam
Add the given query parameter with its associated value to the query.- Parameters:
param- a query parametervalue- the query parameter value
-
setParam
Set the given query parameter with its associated value on the query. This will override any previously existing query parameters with the same name.- Parameters:
param- a query parametervalue- the query parameter value
-
removeParam
Remove any query parameters from the query that match the given query parameter.- Parameters:
param- a query parameter to remove from the query
-
clearParams
void clearParams()Clear all query parameters from the query.
-