13.05.2014 Views

apache-solr-ref-guide-4.6.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

in <strong>solr</strong>config.xml),<br />

which is *:*. This<br />

query will find all<br />

records in the index for<br />

this core. We kept the<br />

other defaults, but the<br />

table below explains<br />

these options, which<br />

are also covered in<br />

detail in later parts of<br />

this Guide.<br />

The response is shown<br />

to the right of the form.<br />

Requests to Solr are<br />

simply HTTP requests,<br />

and the query<br />

submitted is shown in<br />

light type above the<br />

results; if you click on<br />

this it will open a new<br />

browser window with<br />

just this request and<br />

response (without the<br />

rest of the Solr Admin<br />

UI). The rest of the<br />

response is shown in<br />

JSON, which is part of<br />

the request (see the<br />

wt=json part at the<br />

end).<br />

The response has at<br />

least two sections, but<br />

may have several<br />

more depending on the<br />

options chosen. The two sections it always has are the responseHeader and the response. The responseHeader includes the status of the<br />

search ( status), the processing time ( QTime), and the parameters ( params) that were used to process the query.<br />

The response includes the documents that matched the query, in doc sub-sections. The fields return depend on the parameters of the query<br />

(and the defaults of the request handler used). The number of results is also included in this section.<br />

This screen allows you to experiment with different query options, and inspect how your documents were indexed. The query parameters<br />

available on the form are some basic options that most users want to have available, but there are dozens more available which could be simply<br />

added to the basic request by hand (if opened in a browser). The table below explains the parameters available:<br />

Field<br />

Request-handler<br />

Description<br />

Specifies the query handler for the request. If a query handler is not specified, Solr processes the response with the<br />

standard query handler.<br />

q The query event. See Searching for an explanation of this parameter.<br />

fq The filter queries. See Common Query Parameters for more information on this parameter.<br />

sort<br />

Sorts the response to a query in either ascending or descending order based on the response's score or another specified<br />

characteristic.<br />

start, rows start is the offset into the query result starting at which documents should be returned. The default value is 0, meaning<br />

that the query should return results starting with the first document that matches. This field accepts the same syntax as the<br />

start query parameter, which is described in Searching. rows is the number of rows to return.<br />

fl<br />

wt<br />

indent<br />

debugQuery<br />

Defines the fields to return for each document. You can explicitly list the stored fields you want to have returned by<br />

separating them with either a comma or a space. In Solr 4, the results of functions can also be included in the fl list.<br />

Specifies the Response Writer to be used to format the query response. Defaults to XML if not specified.<br />

Click this button to request that the Response Writer use indentation to make the responses more readable.<br />

Click this button to augment the query response with debugging information, including "explain info" for each document<br />

returned. This debugging information is intended to be intelligible to the administrator or programmer.<br />

dismax Click this button to enable the Dismax query parser. See The DisMax Query Parser for further information.<br />

edismax Click this button to enable the Extended query parser. See The Extended DisMax Query Parser for further information.<br />

Apache Solr Reference Guide 4.6<br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!