Elasticsearch completion suggester query in PHP

后端 未结 2 640
盖世英雄少女心
盖世英雄少女心 2021-01-24 11:05

I was not able to find a working example on how to query Elasticsearch using the completion suggester in PHP (elasticsearch-php).

Querying via CURL, e.g.



        
2条回答
  •  渐次进展
    2021-01-24 11:59

    Using the PHP elasticsearch API

         'my_index',
               'search_type' =>  'match',
               'search_key' => 'citynamefield',
               'search_value' => 'orlando'
           );
           $search_results = $elastic_search->searchElastic($search_params);
           echo '
    ';
    print_r($search_results);
    

提交回复
热议问题