Working with the crawl database
Some connectors use a crawl database to track documents that have been seen by prior crawls and are able to use this information to understand which documents are new or have been updated or removed and take appropriate action in the index. The/api/connectors/datasources/DATASOURCE_ID/db
endpoints allow dropping tables or clearing the database.
All V2 connectors support the crawl database as well as some V1 connectors, like the Lucid.fs connector. The Lucid.anda connector also uses a crawl database, but it is not the same database, and does not have a REST API or other interface to access it.
Drop tables from a crawlDB
The output from a DELETE request to/api/connectors/datasources/DATASOURCE_ID/db/<table>
will be empty. When dropping the database, note that no documents will be removed from the index. However, the crawl database will be empty, so on the next datasource run, all documents will be treated as though they were never seen by the connectors.
When dropping tables, be aware that the items
table does not delete documents from the index, but instead changes the database so database considers them new documents. When dropping other tables, such as the errors
table, it will merely clear out old error messages.
Delete items from a crawlDB
A DELETE request to/api/connectors/datasources/DATASOURCE_ID/db
removes the information from the Crawl Database only. Note that this does not affect the Solr Index.
Examples
Get datasources assigned to the “demo” collection: REQUESTmax_docs
value for the above datasource:
REQUEST
The
validate=true
element in the create datasource command only validates the datasource. It does not automatically save the datasource. An example using this element is:https://EXAMPLE_COMPANY.b.lucidworks.cloud/api/apps/APP_NAME/datasources?validate=true
The POST /datasources
section of the API specification allows you to set the validate
element for testing and use.