Support Resources

LucidWorks Forum
KnowledgeBase

LucidWorks Search v2.5

PDF Versions

Older Versions

LucidWorks 2.1
LucidWorks 2.0
LucidWorks 1.8

This is the documentation for the LucidWorks Search v2.5, the latest release. Go here for LucidWorks 2.1.

Skip to end of metadata
Go to start of metadata

The Collection Info API can be used to retrieve some statistics about a particular collection. You can use this API to retrieve all data for a collection, or just a specific key, such as the data_dir or free_disk_space.

API Entry Points

/api/collections/collection/info: get all info about the collection.

/api/collections/collection/info/name: get specific info about the collection.

Get All Information About a Collection

GET /api/collections/collection/info

Returns all information about the collection.

Input

Path Parameters

Key Description
collection the collection name

Query Parameters

None

Output

Output Content

A JSON map of collection information keys mapped to their values.

Key Type Description
collection_name string The name of collection.
data_dir string The directory where the index and other data resides.
free_disk_space string A human-readable string indicating the amount of free disk space on the partition where the index resides.
free_disk_bytes 64-bit integer The total number of bytes available on the partition where the index resides.
index_is_current boolean Is true unless the index on disk has changes not yet visible by this instance.
index_directory string The current Directory implementation being used for this index.
index_has_deletions boolean Is true if the index has deleted documents since the last optimization.
index_last_modified date string The date and time that the index was last modified (1-second resolution).
index_max_doc 64-bit integer The largest doc ID in the index.
index_num_docs 64-bit integer The number of documents in the index.
index_is_optimized boolean Is true if the index was optimized after the last document was indexed.
index_size 64-bit integer A human-readable string indicating the total size of the index.
index_size_bytes 64-bit integer The exact size of the index in bytes.
index_version 64-bit integer A version stamp for the index.
instance_dir string The home directory for the collection.
root_dir string The root directory of the partition on which the index resides.
total_disk_space string A human-readable string indicating the amount of total disk space on the partition where the index resides.
total_disk_bytes 64-bit integer The number of total bytes on the partition where the index resides.

Response Codes

200: OK

Examples

Input

curl 'http://localhost:8888/api/collections/collection1/info'

Output

{
    "free_disk_space": "10.7 GB",
    "index_last_modified": "2011-03-18T03:46:59+0000",
    "index_has_deletions": true,
    "data_dir": "C:\\Users\\Nick\\LucidImagination\\LucidWorksEnterpriseDocs\\bin\\..\\solr\\cores\\collection1_0\\data",
    "index_size": "3.8 MB",
    "index_directory": "org.apache.lucene.store.MockDirectoryWrapper",
    "collection_name": "collection1",
    "index_is_optimized": false,
    "index_size_bytes": 3990150,
    "free_disk_bytes": 11491110912,
    "index_max_doc": 169,
    "index_num_docs": 136,
    "index_version": 1300398945104,
    "index_is_current": true,
    "root_dir": "C:\\",
    "instance_dir": "collection1_0",
    "total_disk_space": "222.7 GB",
    "total_disk_bytes": 239171792896
}

Back to Top

Get Specific Information About a Collection

GET /api/collections/collection/info/name

Input

Path Parameters

Key Description
collection the collection name
name the name of the info key

Query Parameters

None

Input Content

Key Type Description
collection_name string The name of collection.
data_dir string The directory where the index and other data resides.
free_disk_space string A human-readable string indicating the amount of free disk space on the partition where the index resides.
free_disk_bytes 64-bit integer The total number of bytes available on the partition where the index resides.
index_is_current boolean Is true unless the index on disk has changes not yet visible by this instance.
index_directory string The current Directory implementation being used for this index.
index_has_deletions boolean Is true if the index has deleted documents since the last optimization.
index_last_modified date string The date and time that the index was last modified (1-second resolution).
index_max_doc 64-bit integer The largest doc ID in the index.
index_num_docs 64-bit integer The number of documents in the index.
index_is_optimized boolean Is true if the index was optimized after the last document was indexed.
index_size 64-bit integer A human-readable string indicating the total size of the index.
index_size_bytes 64-bit integer The exact size of the index in bytes.
index_version 64-bit integer A version stamp for the index.
instance_dir string The home directory for the collection.
root_dir string The root directory of the partition on which the index resides.
total_disk_space string A human-readable string indicating the amount of total disk space on the partition where the index resides.
total_disk_bytes 64-bit integer The number of total bytes on the partition where the index resides.

Output

Output Content

A JSON map of Collection information keys mapped to their values. For a list of the keys, see GET: Output Content.

Response codes

200: OK

404: Not Found

Tip
When requesting collection info, you can pass a comma-separated list of keys (such as index_current,index_version) rather than separate requests for each key.

Examples

Request the number of documents and index version for the collection.

Input

curl 'http://localhost:8888/api/collections/collection1/info/index_version,index_num_docs'

Output

{
    "index_num_docs":136,
    "index_version":1300398945104
}
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.