Quick Index
To create a quick index, left-click on the QUICK INDEX button, towards the right-hand side:
The QUICK INDEX screen appears:
To define a basic index on which Full Text Search can be performed, begin by entering a unique name for the index into the Index Name field, at the upper-left: for example, travel-sample-index. (Note that only alphanumeric characters, hyphens, and underscores are allowed for index names. Note also that the first character of the name must be an alphabetic character.) Then, use the pull-down menu provided for the Keyspace field, at the upper-right, to specify as follows:
bucket: travel-sample
scope: inventory
collection: hotel
The user can continue to randomly pick documents until they find a document of their intended type/schema. It is also possible to have multi-schema documents within a collection.
Select the required field from the document, which is needed to be mapped to this index. Once the field is selected, the configuration panel is displayed at the right.
Select the related type for the field from the dropdown. Select Index this field as an identifier to index the identifier values exactly as it is without any transformation; for this case, language selection is disabled.
Configuration allows you to specify the language selection for the specified field. You can select the given configuration , but it requires additional storage and will make the index larger.
Include In search results, Support phrase matching, and Support sorting and faceting. Searchable As field allows you to modify searchable input for the selected field.
Once the configuration is completed for the selected fields, click Add. Mapped fields will display the updated columns.
This is all you need to specify in order to create a basic index for test and development. No further configuration is required.
Note, however, that such default indexing is not recommended for production environments since it creates indexes that may be unnecessarily large, and therefore insufficiently performant. To review the wide range of available options for creating indexes appropriate for production environments, see Creating Indexes.
To save your index,
Left-click on the Create Index button near the bottom of the screen:
At this point, you are returned to the Full Text Search screen. A row now appears, in the Full Text Indexes panel, for the quick index you have created. When left-clicked on, the row opens as follows:
| The percentage figure: this appears under the indexing progress column, and is incremented in correspondence with the build-progress of the index. When 100% is reached, the index build is said to be complete. Search queries will , however be allowed as soon as the index is created, meaning partial results can be expected until the index build is complete. |
Once the new index has been built, it supports Full Text Searches performed by all available means: the Console UI, the Couchbase REST API, and the Couchbase SDK. The indexing progress is determined as index_doc_count / source_doc_count. While index_doc_count is retrieved from the search endpoint, source_doc_count is retrieved from a KV endpoint.
In the event where one or more of the nodes in the cluster running data service go down and/or are failed over, indexing progress may show a value > 100% as the source_doc_count for the bucket would be missing some active partitions.