Can RT tables have string attributes?

When I was setting up my indexes as plain indexes, I defined a date field (of the format YYYY-MM-DD) as type sql_attr_string in the source definition in manticore.conf.

Subsequently, I decided to use RT tables rather than a plain index. However, defining the date field using 'date' => ['type' => 'text'] in the create() statement for the table (using the PHP client) apparently defines a field rather than an attribute, and thus results cannot be sorted by date.

How should I be defining this in the RT table so that I can still sort by date?

I think ['type' => 'string'] is what I was looking for.

can also specify options to the ‘text’ type.

                'title' => [
                    'type' => 'text',
                    'options' => ['indexed', 'stored']

type=string, just works like type=text, options=indexed, attribute

1 Like