|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.search.QParser
public abstract class QParser
| Constructor Summary | |
|---|---|
QParser(String qstr,
org.apache.solr.common.params.SolrParams localParams,
org.apache.solr.common.params.SolrParams params,
SolrQueryRequest req)
|
|
| Method Summary | |
|---|---|
void |
addDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo)
|
String[] |
getDefaultHighlightFields()
|
org.apache.lucene.search.Query |
getHighlightQuery()
|
org.apache.solr.common.params.SolrParams |
getLocalParams()
|
protected String |
getParam(String name)
check both local and global params |
org.apache.solr.common.params.SolrParams |
getParams()
|
static QParser |
getParser(String qstr,
String defaultType,
SolrQueryRequest req)
Create a QParser to parse qstr,
assuming that the default query type is defaultType. |
org.apache.lucene.search.Query |
getQuery()
Returns the resulting query from this QParser, calling parse() only the first time and caching the Query result. |
SolrQueryRequest |
getReq()
|
SortSpec |
getSort(boolean useGlobalParams)
|
String |
getString()
|
abstract org.apache.lucene.search.Query |
parse()
Create and return the Query object represented by qstr |
void |
setLocalParams(org.apache.solr.common.params.SolrParams localParams)
|
void |
setParams(org.apache.solr.common.params.SolrParams params)
|
void |
setReq(SolrQueryRequest req)
|
void |
setString(String s)
|
QParser |
subQuery(String q,
String defaultType)
Create a new QParser for parsing an embedded sub-query |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QParser(String qstr,
org.apache.solr.common.params.SolrParams localParams,
org.apache.solr.common.params.SolrParams params,
SolrQueryRequest req)
| Method Detail |
|---|
public abstract org.apache.lucene.search.Query parse()
throws org.apache.lucene.queryParser.ParseException
Query object represented by qstr
org.apache.lucene.queryParser.ParseExceptiongetQuery()public org.apache.solr.common.params.SolrParams getLocalParams()
public void setLocalParams(org.apache.solr.common.params.SolrParams localParams)
public org.apache.solr.common.params.SolrParams getParams()
public void setParams(org.apache.solr.common.params.SolrParams params)
public SolrQueryRequest getReq()
public void setReq(SolrQueryRequest req)
public String getString()
public void setString(String s)
public org.apache.lucene.search.Query getQuery()
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected String getParam(String name)
public QParser subQuery(String q,
String defaultType)
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseException
public SortSpec getSort(boolean useGlobalParams)
throws org.apache.lucene.queryParser.ParseException
useGlobalParams - look up sort, start, rows in global params if not in local params
org.apache.lucene.queryParser.ParseExceptionpublic String[] getDefaultHighlightFields()
public org.apache.lucene.search.Query getHighlightQuery()
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionpublic void addDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo)
public static QParser getParser(String qstr,
String defaultType,
SolrQueryRequest req)
throws org.apache.lucene.queryParser.ParseException
QParser to parse qstr,
assuming that the default query type is defaultType.
The query type may be overridden by local parameters in the query
string itself. For example if defaultType="dismax"
and qstr=foo, then the dismax query parser will be used
to parse and construct the query object. However
if qstr={!prefix f=myfield}foo
then the prefix query parser will be used.
org.apache.lucene.queryParser.ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||