Creating a Range Index on a Field
- Last Updated: April 15, 2026
- 1 minute read
- MarkLogic Server
- Version 11.0
- Documentation
You can create a range index on a field for faster searches on the field data. You must first create a field before creating a range index on the field. The usual trade-offs between query speed and ingestion speed and server resources described in Understanding Range Indexes apply to field range index.
To create a range index on a field, follow these steps:
-
Click Databases in the left tree menu. A list of databases appears.
-
Click your target database.
-
Click Field Range Indexes in the left tree menu.
Note:
Creating a Range Index automatically configures a Field Range Index on the field being created or updated. -
Click the Add tab.
-
Select a value from the Scalar Type field.
-
Enter the name of an existing field.
-
In the Range Value Positions field, select
trueif you want the index to store position data. (Metadata fields are positionless, so position settings have no impact.) -
In the Invalid Values list, select
rejectto prevent the ingestion of documents with fields that do not match the type specified for the range index. Selectignoreto allow the ingestion of non-matching documents. -
Click OK.
The index is created. If the reindexer enable setting is true for that database, then reindexing will begin immediately. The new index is not available for use in range and lexicon queries until the reindexing operation is complete.