---
title: "Index Maintenance"
manual: "Apache Solr for TYPO3"
version: "main"
permalink: "https://docs.typo3.org/permalink/apache-solr-for-typo3/solr:index-maintenance@main"
source: "Solr/IndexMaintenance.rst"
modified: "2026-09-16T13:53:01+00:00"
---

# Index Maintenance

Solr offers a lot of request handlers to do maintenance tasks.

## Committing pending documents

```bash
curl http://host:port/solr-path/update -H "Content-Type: text/xml"
    --data-binary '<commit />'
```

## Clearing the index

```bash
curl http://host:port/solr-path/update -H "Content-Type: text/xml"
    --data-binary '<delete><query>*:*</query></delete>'

curl http://host:port/solr-path/update -H "Content-Type: text/xml"
    --data-binary '<commit />'
```

## Optimizing the index

This is no longer needed. The old scheduler task have also been removed.

## Searching the index from the command line

Parameters:

-   *q:* what to search for. Format: fieldName:fieldValue
-   *qt:* defines the query type, for the command line we recommend "standard", the extension itself uses "dismax"
-   *fl:* comma separated list of fields to return
-   *rows:* number of rows to return
-   *start:* offset from where to return results

```bash
curl 'http://host:port/path-to-solr/select?q=hello&qt=standard&fl=title,content'
```

## Getting information / statistics about the index

```bash
curl 'http://host:port/path-to-solr/admin/luke'
```

## Create cores with the core admin api

The CoreAdmin API ([https://solr.apache.org/guide/solr/10_0/configuration-guide/coreadmin-api.html](https://solr.apache.org/guide/solr/10_0/configuration-guide/coreadmin-api.html)) allows you, manipulate the cores in your Solr server.

Since we support configSets a core could be generated with the following http call:

```bash
curl 'http://host:port/path-to-solr/admin/cores?action=CREATE&name=core_de&configSet=ext_solr_8_0_0&schema=german/schema.xml&dataDir=../../data/german'
```
