Skip to content

[Feature] Utilize custom "options" of a builder #252

@brownrl

Description

@brownrl

When I make a search call like this:

$results = Statement::search('automated_detection:true')->options([
   'size' => 100
])->keys();

I always get 10 results.

When I look at this function:

\Matchish\ScoutElasticSearch\Engines\ElasticSearchEngine::search
public function search(BaseBuilder $builder)
{
    return $this->performSearch($builder, []);
}

the [] is always sending blank options.

When I change it to bring in the options.

public function search(BaseBuilder $builder)
{
    return $this->performSearch($builder, $builder->options);
}

Then I get a result with 100 results in it.

Am I calling the options and search correctly? Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions