> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Solr API

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-server/reference/api/solr-api

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-server/reference/api/solr-api

[old doc.lw link]: https://doc.lucidworks.com/fusion/5.9/313

The Solr API is used to manage collection-level configurations.

The path for this request is:

`/api/solr/<collectionName>/<solrRequest>`

where *`<collectionName>`* is the name of an specific collection and `<solrRequest>` is the Solr command you wish to run.

Since this API proxies requests to Solr, each available method corresponds to the method in Solr. So, a GET request to Solr would use the GET method of this endpoint; a POST would use the POST method, etc.

Depending on the request, the response may consist of records that match a query
or output from a Schema API request.

<LwTemplate />

## Examples

*Query Solr for documents in the 'docs' collection containing the term 'solr', limiting the results to only 2 records, returning only the title, and in JSON format:*

**REQUEST**

```sh wrap  theme={"dark"}
https://FUSION_HOST:8764/api/solr/docs/select?q=solr&rows=2&fl=title&wt=json
```

**RESPONSE**

```json wrap  theme={"dark"}
{
    "responseHeader": {
        "status": 0,
        "QTime": 2,
        "params": {
            "fl": "title",
            "q": "solr",
            "wt": "json",
            "rows": "2"
        }
    },
    "response": {
        "numFound": 52,
        "start": 0,
        "docs": [
            {
                "title": [
                    "Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
                ]
            },
            {
                "title": [
                    "Search Clusters - Fusion Documentation - Lucidworks"
                ]
            }
        ]
    }
}
```
