Skip to content

use rt_field directive  #58

Description

@ChrisJokinen

I have a script that I use to make a number of rt indexes which works fine like this.

'ww_blocked_ips' => [
	'src_id'        => ['type' => 'bigint'],
	'ip' 			=> ['type' => 'text'],
	'reason'		=> ['type' => 'uint'],
	'user_id'		=> ['type' => 'uint'],
	'creation_time'	=> ['type' => 'uint']
],

my code changes this as need for manticoresearch-php to make a index.
The issue is here

'ww_business_names' => [
    'src_id'    	=> ['type' => 'uint'],
    'name'          => ['type' => 'string'],
    'city'          => ['type' => 'string'],
    'state'         => ['type' => 'uint'],
    'featured'      => ['type' => 'uint'],
    'seo_url'       => ['type' => 'string']
],

The response I get is ...

PHP Fatal error:  Uncaught Manticoresearch\Exceptions\ResponseException: "error adding index 'ww_business_names': no fields configured (use rt_field directive)" in /var/www/html/manticore/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Transport/Http.php:126
Stack trace:
#0 /var/www/html/manticore/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Client.php(353): Manticoresearch\Transport\Http->execute()
#1 /var/www/html/manticore/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Indices.php(74): Manticoresearch\Client->request()
#2 /var/www/html/manticore/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Index.php(239): Manticoresearch\Indices->create()
#3 /var/www/html/manticore/manticore.php(60): Manticoresearch\Index->create()
#4 /var/www/html/manticore/manticore.php(287): viath\manticore\manticore->create_indexes()
#5 {main}
  thrown in /var/www/html/manticore/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Transport/Http.php on line 126

any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions