Module Hub Beta

FT.CREATE

index_name field1 weight1 field2 weight2 ...

Creates an index with the given spec. The index name will be used in all the key names
so keep it short!

Parameters:

  • index: the index name to create. If it exists the old spec will be overwritten
  • field / weight pairs: pairs of field name and relative weight in scoring.
    The weight is a double, but does not need to be normalized.

Return Value

Simple String Reply: OK if the index was created, an error otherwise.

Examples

redis> FT.CREATE docs title 2.0 body 1.0 url 1.5
OK

© 2017 Redis Labs, Inc. All rights reserved.