You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the suggester API and am using query objects to configure the query it needs to perform. Configuring works but to actually perform a suggest query I have to overwrite the query's run method like this:
/** * Build and execute the query. * * @return SuggestionsResultParser */publicfunctionrun()
{
$query = $this->buildQuery();
$rawResults = $this->searcher->getClient()->suggest($query);
// Pass response to the class that will do something with it.$resultParser = $this->getResultParser();
$resultParser->setRawResults($rawResults);
return$resultParser;
}
A lot of boilerplate to configure one method, it would be nice if this was easily configurable through a method something like:
/** * Build and execute the query. * * @return SuggestionsResultParser */publicfunctionrun()
{
$query = $this->buildQuery();
$rawResults = $this->executeSearch($query);
// Pass response to the class that will do something with it.$resultParser = $this->getResultParser();
$resultParser->setRawResults($rawResults);
return$resultParser;
}
The text was updated successfully, but these errors were encountered:
I'm using the suggester API and am using query objects to configure the query it needs to perform. Configuring works but to actually perform a suggest query I have to overwrite the query's
run
method like this:A lot of boilerplate to configure one method, it would be nice if this was easily configurable through a method something like:
The text was updated successfully, but these errors were encountered: