manticoresearch-php icon indicating copy to clipboard operation
manticoresearch-php copied to clipboard

suggest не работает

Open hrustbb2 opened this issue 4 years ago • 1 comments

$config = ['host'=>'manticore','port'=>9308]  
$client = new Client($config);  
$suggest = $client->index('suggest');  
$suggest->create([  
            'explanation' => [  
                'type' => 'text',  
            ],  
        ],  
        [  
            'min_infix_len' => 1,  
            'dict' => 'keywords',  
        ]);  
  
$suggest->addDocument([  
                'explanation' => 'Автобус',  
            ]);  

затем:

$query = [  
        'index' => 'suggest',  
        'body' => [  
            'query' => 'овтобус',  
            'options' => [  
                'limit' => 1,  
            ],  
        ],  
    ];  
      
$r = $client->suggest($query);  

Результат пустой

hrustbb2 avatar Oct 30 '21 10:10 hrustbb2

Can you please specify what versions of Manticore and the client you used?

Nick-S-2018 avatar Jul 11 '22 12:07 Nick-S-2018