ft.info
The FT.INFO command provides information about an index. Variants of the command are available in cluster mode to aggregate index information across the cluster.
FT.INFO <index-name>
[LOCAL | PRIMARY | CLUSTER]
[ALLSHARDS | SOMESHARDS]
[CONSISTENT | INCONSISTENT]
-
<index-name>(required): The name of the index to return information about. -
LOCAL(optional): Only the executing (local) node provides index information. This is the default. -
PRIMARY(optional): The primary nodes of every shard in the cluster are queried to generate index information. This is only valid when cluster mode is enabled. -
CLUSTER(optional): All nodes, primary or replica, are queried to generate index information. This is only valid when cluster mode is enabled. -
ALLSHARDS(optional): If specified, a response is required from every shard in the system. If all responses are not received within a time window the command is terminated with an error. This is the default. -
SOMESHARDS(optional): If specified, a response is NOT required from every shard in the system. If all responses are not received within the time window, only the received responses are returned and no error is generated. -
CONSISTENT(optional): If specified, the command is terminated with an error if any received response isn't from a consistent version of the index. This is the default. -
INCONSISTENT(optional): If specified, a command result is generated using only the responses from nodes with a consistent version of the index.
RESPONSE
Response when LOCAL is specified
The LOCAL response contains both the definition of the index as well as the status of that index on the node that executes the command.
An array of key value pairs.
-
index_name(string) The index name -
index_definition(an array of key/value pairs)key_type(string)HASHorJSONprefixes(array of strings) The declared prefixes for this indexfilter(string) The index'sFILTERexpression. Only present when the index was created withFILTER.default_score(double) The index's configuredSCOREvaluescore_field(string) The index's configuredSCORE_FIELD, or an empty string if none
The two fields above require
search.emulate-releaseto be1.3.0or later. Below that — including at the default setting —index_definitionomitsscore_fieldand reportsdefault_scoreas the bulk string"1". See COMPATIBILITY.md. -
attributes(array of arrays) One entry per declared attribute of the index.identifier(string) identifier for this attributeattribute(string) The name used to refer to this index in query and aggregation expressions.user_indexed_memory(integer) Number of bytes of user data ingested into this field.type(string) One ofNUMERIC,TAG,TEXTorVECTOR- Type-specific extension (see below)
SORTABLE(string)1if the attribute was declaredSORTABLE,0otherwise. Not reported forVECTORattributes, which cannot be declaredSORTABLE. RediSearch reports this as a bare token present only when declared.UNF(string)1if the attribute was declaredSORTABLE UNF,0otherwise. Reported only forTAGandTEXTattributes, the only types whose sort value is normalized. RediSearch reports this as a bare token present only when declared.
-
num_docs(integer) Total keys in the index -
num_records(integer) Total number of fields indexed. -
total_term_occurrences(integer) Total number of terms in all text fields in this index. -
num_terms(integer) Total number of unique terms in all text fields in this index. -
hash_indexing_failures(string) INTEGER. Count of unsuccessful indexing attempts -
filter_rejected_keys(string) INTEGER. Number of filter-rejection events: each time a key is evaluated against the indexFILTERexpression and does not satisfy it, the count increases by one. A key can be rejected more than once (for example, when it is rewritten, or when it is written while the initial backfill is in progress), so this is not a count of distinct keys. For aHASHindex aFILTERmay reference a field that is not declared in the schema, in which case the field is read directly off the key; a misspelled field name therefore does not fail the command but instead behaves as a missing field. Afilter_rejected_keysvalue that unexpectedly matches, nearly matches, or exceeds the number of ingested keys is the primary signal that a field name in theFILTERexpression is misspelled. -
backfill_in_progress(string). "1" if a backfill is currently running. "0" if not. -
backfill_complete_percent(string) Estimated progress of background indexing. Percentage is expressed as a fractional value from 0 to 1.0. -
mutation_queue_size(string) Number of keys contained in the mutation queue. -
recent_mutations_queue_delay(string)0 secif the mutation queue is empty. Otherwise it is the elapsed time, from scheduling through completion of processing, recorded by the last sampled mutation to update this statistic, in whole seconds rounded down, in the form<seconds> sec. One in every 1000 scheduled mutations is sampled; mutations processed inline are not sampled. -
state(string) Current backfill state.readyindicates not backfill is in progress.backfill_in_progressbackfill operation proceeding normally.backfill_paused_by_oombackfill is paused because the Valkey instance is out of memory.
The following four fields are only present when the index has at least one TEXT attribute.
punctuation(string) list of punctuation characters.stop_words(array of strings) list of stop words. Empty if the index was created withNOSTOPWORDS.with_offsets(string) "1" if offsets are included. "0" if offsets are not includedmin_stem_size(integer) Minimum stemming size for this index.
The following field is always present:
language(string) The index'sLANGUAGE, reported in lowercase (for example,english).englishif the index was created withoutLANGUAGE.
NUMERIC Field Type Extension
size(string) INTEGER. Number of keys that have this numeric attribute present.
TAG Field Type Extension
SEPARATOR(string) The actual separator character.CASESENSITIVE(string) "0" or "1".size(string) INTEGER. Number of keys that have this tag attribute present.
TEXT Field Type Extension
WITH_SUFFIX_TRIE(string) "0" or "1".NO_STEM(string) "0" or "1".WEIGHT(string) The attribute'sWEIGHT. Currently always "1".
VECTOR Field Type Extension
index(array)capacity(integer) The current capacity for the total number of vectors that the index can store.dimensions(integer) Dimension countdistance_metric(string) Possible values areL2,IPorCOSINEsize(string) INTEGER. Number of valid vectors for this attributedata_type(string) Element data type of the vector. Possible values areFLOAT32,FLOAT16orBFLOAT16algorithm(array of key/value pairs) Extended information about the vector indexing algorithm for this attribute.
FLAT VECTOR Field Type Extension.
name(string)FLAT.block_size(number) block size for this attribute.
HNSW VECTOR Field Type Extension.
name(string)HNSW.m(integer) The count of maximum permitted outgoing edges for each node in the graph in each layer. The maximum number of outgoing edges is 2*M for layer 0. The Default is 16. The maximum is 512.ef_construction(integer) The count of vectors in the index. The default is 200, and the max is 4096. Higher values increase the time needed to create indexes, but improve the recall ratio.ef_runtime(integer) The count of vectors to be examined during a query operation. The default is 10, and the max is 4096.
Response when the PRIMARY option is specified.
An array of key value pairs
Totals are summed over the primaries that responded. With SOMESHARDS, a primary that does not respond is omitted, so totals may be lower than the full cluster's.
Inside MULTI/EXEC or a Lua script, no other nodes are queried and the LOCAL response is returned instead.
mode(string) Will have the valueprimary.index_name(string) The index namenum_docs(string) INTEGER. Total keys in the indexnum_records(string) INTEGER. Total records in the indexhash_indexing_failures(string) INTEGER. Count of unsuccessful indexing attemptsattributes(array of arrays) One entry per declared attribute of the index.identifier(string) identifier for this attributeattribute(string) The name used to refer to this index in query and aggregation expressions.user_indexed_memory(integer) Number of bytes of user data ingested into this field, summed across the primaries.num_records(integer) Number of records indexed for this attribute, summed across the primaries.
index_fingerprint(integer) Fingerprint of the index definition on the node that executes the command. Only present whensearch.info-developer-visibleisyes; intended for debugging.index_version(integer) Version of the index definition on the node that executes the command. Only present whensearch.info-developer-visibleisyes; intended for debugging.
Response when the CLUSTER option is specified
An array of key value pairs
Totals, minimums and maximums are computed over the nodes that responded. With SOMESHARDS, a node that does not respond is omitted, so totals may be lower than the full cluster's.
Inside MULTI/EXEC or a Lua script, no other nodes are queried and the LOCAL response is returned instead.
mode(string) Will have the valuecluster.index_name(string) The index namebackfill_in_progress(string) 0 or 1. Is backfill in progressbackfill_complete_percent_max(string) FLOAT32. Maximum backfill complete percent in all nodesbackfill_complete_percent_min(string) FLOAT32. Minimum backfill complete percent in all nodesstate(string) The current state of the index, one of:ready,backfill_in_progressorbackfill_paused_by_oomattributes(array of arrays) One entry per declared attribute of the index.identifier(string) identifier for this attributeattribute(string) The name used to refer to this index in query and aggregation expressions.user_indexed_memory(integer) Number of bytes of user data ingested into this field, summed across all nodes, primaries and replicas.
谢谢你的反馈!