Example Searches
This section simply provides some examples of things you can do with
Solr on a
Content Store
web site. The examples are based on the default
schema.xml
supplied with the
Content Store.
The examples are shown as HTTP requests that can be submitted directly
to your Solr server. The basic format of such a request is:
http://your-host/solr/select?query-parameters
where:
- your-host
-
is the host name or IP address of the host on which your Solr server is running
- query-parameters
-
is an ampersand-separated list of query parameters. There are many query parameters you can use to control Solr. The parameters used in these examples include:
q=
query-
The query itself, for example:
q=london
-
Return all documents containing "london" in any indexed field
q=city:london
-
Return all documents containing "london" in the
city
field q=*:*
-
Return all documents
- contenttype
-
Filters the results by content type, for example:
contenttype=story
-
Return only results from story content items
contenttype=com.escenic.person
-
Return only results from Person records
wt=
writer-type-
Determines the format of the returned data. For example:
wt=xml
-
Return XML data
wt=json
-
Return JSON data
rows=
integer-
Determines the number of rows to return.
facet=
boolean-
Specifying
facet=true
switches faceting on for this query. facet.field=
field-name-
Specifies a field on which faceting is to be performed. This parameter can be specified several times in the same query.