Finding a Sitecore item by ID using a Solr query

By default the _group field contains the Sitecore ID for a specific item. To search for an item with an ID of {799539AB-3495-4D40-9B2F-A394A87960D6} use the following Solr query:


Please note the ID is not stored in the group field as a standard GUID. For the search to work hyphens need removing and converting to lower case.

However this will only work for an item with a single version and language. As Sitecore uses the same item for each piece of content, regardless of the number of versions or languages, the above query may return multiple results.

In this case we need to use the _uniqueid field to return the exact item representing a specific version and language. In this example we change the Solr query to:


SOLR Admin Core Commands

It is assumed that Solr is installed in your local machine and at port 8080. If different, change the URL and port accordingly.

SOLR Core Status

If you want to know the status of multiple cores or status of the instance if no cores, by visiting the below URL from your browser.

If you want to know the status of any single core in particular, say core1, visit

Reload SOLR Core

If you want the configuration changes you have done in schema.xml or solrconfig.xml to take effect without restart of whole instance, you can just reload the specific core you want to reload. By reloading the specific core, your downtime is virtually zero. Use the following URL to load new configuration without restarting.

Deleting SOLR core in Runtime

In rare case, where you want to delete or unload the SOLR core, You can do so by visiting,
If you wish to delete the index on unload, you can pass deleteindex as an optional parameter to the URL above with value true.

Refresh SOLR Index

If you want to refresh the index documents in SOLR after deleting the solr index and remove all the documents currently indexed in SOLR, you can use the following URL to perform the SOLR index flush. This URL clears the current SOLR index and does a fresh import from the data source. In case you do not have multiple cores, just remove the core name (core1) from the URL below.
By default, the existing index is cleaned up before indexing starts and the new data is committed after the indexing operation. You can override the behaivour by sending extra parameters,
If the commit is set to false, the indexed data is not commited. If clean is set to false, the old index is not cleared and stale data will be served.

In case, you want to perfrom a delta import into SOLR, You can do so using the URL below,
The status of the data import can be monitored at

Reloading Configuration of DataImportHandler

On configuration changes, you can reload the configuration changes from the file without restarting the SOLR instance by the URL below.
In case you want to stop the data import operation in SOLR,
In case of single core instance, remove the core name (core1) from above URLs and it should work fine..

Solr query fields explained

q: This is the search query. For example to find all documents with monkey in a field called name use name:”monkey”. Documentation can be found here 

fq: Filter Query – This parameter can be used to specify a query that can be used to restrict the super set of documents that can be returned, without influencing score. It can be very useful for speeding up complex queries since the queries specified with fq are cached independently from the main query. Caching means the same filter is used again for a later query (i.e. there’s a cache hit).

sort: Applies sorting to the results set i.e. price asc or score desc

start: Applies an offset, by default start is 0 (first document). However its possible to start further along the dataset by setting the start value.

rows: Specifies how many rows to return, the default is 10.

fl: Specifies which fields to show, leaving this blank returns all fields, i.e. id name price

df: Sets the default field.

Raw Query Parameters: Allows specific values to be inserted into the query such as field1=”test”

wt: This specified what format the results are returned in. The default is JSON however there are a number of different options such as XML and CSV

Solr – Restarting a core with restarting entire Solr instance

Some config changes to Solr require a restart. However since Solr 4.0 it’s possible to restart individual cores without restarting the entire instance.

To restart a core enter http://localhost:8983/solr/admin/cores?action=RELOAD&core=core0 where core0 is the name of the core to restart, that’s it.

This will also schema.xml and solrconfig.xml changes without bring the entire Solr instance down.

However there are few configuration changes which still needs, the restart of SOLR instance,
1) IndexWriter related settings in
2) Change in location