Solr Admin UI provides a form to search for documents.
The form provides fields that you can fill to filter the result, add more metadata to the result, and customize the format of the response.
Notice the URL when click the "
Execute Query" button:
http://192.168.2.22:8983/solr/collection6/select?q=*%3A*&wt=xml&indent=on&start=1&rows=1
The response will have two parts: header and result
The response header will have the following format:
Solr response header format:
- zkConnected: "true" (if no errors).
- status: "0" (if no errors).
- QTime: Execution time of the request.
- params: Request parameters.
Notice the response header has a "
status" element that indicates the status of the request.
It also has a "
QTime" element that indicate the request execution time in milliseconds.
Note that this time might be affected by the caching capability of Solr.
Also note that this time doesn't include the time to read and print the response in the client application.
The "
params" element shows the parameters used to executed the query.
Note that the parameters list won't include any parameter defined by the request handler in "
solrConfig.xml".
If you want to see all parameters you can use the "
echoParams" element and set its value to "
EXPLICIT" (default) or "
ALL".
The response result will have the following format:
Solr response result format:
- numFound: number of found documents.
- start: returns documents starting from the specified position index in the found documents list.
- docs: list of returned documents.
The response result has a "
numFound" element that indicates the number of documents that match the query.
The "
start" element (combined with the "
rows" parameter of the request) allow paginating on the documents of the response.
The "
maxScore" element indicates the maximum score of all documents of the response.
The response result lists the documents that match the query.
Note that the fields of the document that are shown are by default all the fields that have the "
stored" parameter set a "
true" in the Solr schema.
Here are the fields of the Query form:
-
Common parameters
:
Request-Handler (qt)
: Request handler defined in "solrconfig.xml
" (default: "/select").
common
:
q
: Query string (*:*).
fq
: Filter query.
sort
: Sort field or function with "asc"|"desc".
start, rows
: Number (Integers) of leading documents to skip and number of documents to return after "start".
fl
: Field list (comma separated).
df
: Default search field.
Raw Query Parameters
: Allows adding parameters (key1=val1&key2=val2) that are supported by the query API but are not available in Solr query UI (like facet.sort, facet.limit, facet.mincount, ...).
wt
: The writer type (response format) "json", "xml", ...
indent off
: Do not indent results ("on", "off").
debugQuery
: Show timing and diagnostics ("on", "off").
If no defType
parameter is specified, then by default, the The Standard Query Parser is used (defType=lucene).
Use the "echoParams
" parameter ("EXPLICIT" or "ALL") to list parameters specified in the requestHandler ("solrconfig.xml").
Example:
-
DisMax Query Parser
dismax
:
q_alt
: Alternate query when "q" is absent.
qf
: Query fields with optional boosts.
mm
: Min-should-match expression.
pf
: Phrase boosted fields.
ps
: Phrase boost slop.
qs
: Query string phrase slop.
tie
: Score tie-breaker. Try 0.1.
bq
: Boost query.
bf
: Boost function (added).
Example:
-
Extended DisMax (eDismax) Query Parser
edismax
:
q.alt
: Alternate query when "q" is absent.
qf
: Query fields with optional boosts.
mm
: Min-should-match expression.
pf
: Phrase boosted fields.
ps
: Phrase boost slop.
qs
: Query string phrase slop.
tie
: Score tie-breaker. Try 0.1.
bq
: Boost query.
bf
: Boost function (added).
uf
: User Fields.
pf2
: bigram phrase boost fields.
pf3
: trigram phrase boost fields.
ps2
: phrase slop for bigram phrases.
ps3
: phrase slop for trigram phrases.
boost
: multiplicative boost function.
stopwords
: remove stopwords from mandatory 'matching' component ("on", "off").
lowercaseOperators
: Enable lower-case 'and' and 'or' as operators ("on", "off").
Example:
-
Highlighting
hl
:
hl.fl
: Fields to highlight on.
hl.simple.pre
hl.simple.post
hl.requireFieldMatch
: ("on", "off").
hl.usePhraseHighlighter
: ("on", "off").
hl.highlightMultiTerm
: ("on", "off").
Example:
-
Faceting
facet
:
facet.query
facet.field
facet.prefix
Example:
-
Spatial
spatial
:
-
Spell checking
spellcheck
:
spellcheck.build
: ("on", "off").
spellcheck.reload
: ("on", "off").
spellcheck.q
spellcheck.dictionary
spellcheck.count
spellcheck.onlyMorePopular
: ("on", "off").
spellcheck.extendedResults
: ("on", "off").
spellcheck.collate
: ("on", "off").
spellcheck.maxCollations
spellcheck.maxCollationTries
spellcheck.accuracy
Example: