elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Adding Common options

Open ehsanmnz opened this issue 7 years ago • 0 comments

Hi

Could you provide a way to adding query string like Common options ?

Something like this : In Basemkhirat\Elasticsearch\ScoutEngine::performSearch()

$params = [
            'index' => $this->index,
            'type' => $builder->model->searchableAs(),
            'body' => [
                'query' => [
                    'bool' => [
                        'must' => [['query_string' => [ 'query' => $builder->query]]]
                    ]
                ]
            ],
            "some_key_from_options" => "some_value_from_options"
        ];

merge options and params or another binding from build maybe helpful, something like

$builder->model->setParams()

that return a array that check with checkUserParams() in ES

Thanks

ehsanmnz avatar Nov 17 '17 21:11 ehsanmnz