Indexing
Each object has an index setting that is either true
or false
. The setting is present regardless of whether the namespace supports search operations.
The metadata query engine uses the index setting to determine whether to index custom metadata for an object:
- For objects with an index setting
true
, the metadata query engine indexes custom metadata. - For objects with an index setting
false
, the metadata query engine does not index custom metadata.
The HCPsearch facility uses the index setting to determine whether to index an object at all:
- The HCP search facility indexes objects with an index setting
true
. - The HCP search facility does not index objects with an index setting
false
.
Metadata query API requests can use this setting as a search criterion. Additionally, third-party applications can use this setting for their own purposes.
With HTTP, index settings are returned by the X-HCP-Index
response header. With WebDAV, CIFS, and NFS, you can view the index setting for an object or directory in its index.txt
metafile. In this metafile:
- A value of
1
(one) means true. - A value of
0
(zero) means false.
Default index settings
The namespace is configured with a default index setting. When an object is stored in the namespace, the object inherits this setting. With HTTP, you can override the default index setting by specifying a different index setting when you store the object.
Changing index settings
Changing the index setting on an object causes these changes to the indexes maintained by the metadata query engine and the HCP search facility:
- If you change the index setting of an object from
true
tofalse
:- The metadata query engine removes the custom metadata for the object from the index, but leaves the system metadata and ACL, if any.
- The HCP search facility completely removes the object from the index.
- If you change the index setting of an object from
false
totrue
:- The metadata query engine indexes the custom metadata for the object along with the system metadata and ACL, if any.
- The HCP search facility indexes the object.
With WebDAV, CIFS, or NFS, you change the index setting on an object by overwriting its index.txt metafile. In the new file, you specify only the new value.