docs-devsite/firestore_.indexfield.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Warning: This API is now obsolete.
Instead of creating cache indexes manually, consider using
enablePersistentCacheIndexAutoCreation()to let the SDK decide whether to create cache indexes for queries running locally.
A single field element in an index configuration.
<b>Signature:</b>
export declare interface IndexField
| Property | Type | Description |
|---|---|---|
| arrayConfig | 'CONTAINS' | <b><i>(Public Preview)</i></b> What type of array index to create. Set to <code>CONTAINS</code> for <code>array-contains</code> and <code>array-contains-any</code> indexes.<!-- -->Only one of <code>arrayConfig</code> or <code>order</code> should be set; |
| fieldPath | string | <b><i>(Public Preview)</i></b> The field path to index. |
| order | 'ASCENDING' | 'DESCENDING' | <b><i>(Public Preview)</i></b> What type of array index to create. Set to <code>ASCENDING</code> or 'DESCENDING<code> for </code>==<code>, </code>!=<code>, </code><<!-- -->=<code>, </code><<!-- -->=<code>, </code>in<code> and </code>not-in<!-- -->` filters.<!-- -->Only one of <code>arrayConfig</code> or <code>order</code> should be set. |
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
What type of array index to create. Set to CONTAINS for array-contains and array-contains-any indexes.
Only one of arrayConfig or order should be set;
<b>Signature:</b>
readonly arrayConfig?: 'CONTAINS';
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The field path to index.
<b>Signature:</b>
readonly fieldPath: string;
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
What type of array index to create. Set to ASCENDING or 'DESCENDINGfor<!-- -->==, <!-- -->!=, <!-- --><<!-- -->=, <!-- --><<!-- -->=, <!-- -->inand<!-- -->not-in<!-- -->` filters.
Only one of arrayConfig or order should be set.
<b>Signature:</b>
readonly order?: 'ASCENDING' | 'DESCENDING';