RediSearch / redisearch-py

RediSearch python client

Home Page:https://redisearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phonetic field option

victusfate opened this issue · comments

Greetings.

I'm reviewing RediSearch and wanted to know how I'd pass Phonetic text field options to the python client.

I looked at the source code and didn't see a way to pass it (was hoping it'd be similar to weight).

something like
client.create_index((TextField('title', weight=5.0), TextField('body', phonetic='dm:en')),)

The text field option is defined here https://oss.redislabs.com/redisearch/Commands.html

Any help would be appreciated. Worst case I can make redis-cli system calls but this client looks great for my usage otherwise.

phonetic_matcher was added in v0.9.0, and can be used like that:

TextField('body', phonetic_matcher='dm:en')