Back to Firebase Js Sdk

IndexField interface

docs-devsite/firestore_.indexfield.md

12.12.13.0 KB
Original Source

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 %}

IndexField interface

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>

typescript
export declare interface IndexField 

Properties

PropertyTypeDescription
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;
fieldPathstring<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.

IndexField.arrayConfig

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>

typescript
readonly arrayConfig?: 'CONTAINS';

IndexField.fieldPath

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>

typescript
readonly fieldPath: string;

IndexField.order

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>

typescript
readonly order?: 'ASCENDING' | 'DESCENDING';