Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,11 @@ public function getAggregations($query = null, $filters = [], $queryFilters = []
* @return int|bool
*/
public function getTrackTotalHits();

/**
* Returns if the current request is a fulltext request.
*
* @return bool
*/
public function isFulltext() : bool;
}
8 changes: 8 additions & 0 deletions src/module-elasticsuite-core/Search/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ public function isSpellchecked()
return in_array($this->spellingType, $fuzzySpellingTypes);
}

/**
* {@inheritDoc}
*/
public function getSpellingType()
{
return $this->spellingType;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ public function getTrackTotalHits()
return $this->readBaseConfigParam('track_total_hits');
}

/**
* {@inheritDoc}
*/
public function isFulltext() : bool
{
return (bool) filter_var($this->readBaseConfigParam('fulltext'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
}

/**
* Read configuration param from base config.
*
Expand Down
7 changes: 7 additions & 0 deletions src/module-elasticsuite-core/Search/RequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public function getSortOrders();
*/
public function isSpellchecked();

/**
* Get the request spelling type.
*
* @return string
*/
public function getSpellingType();

/**
* Get the value of the track_total_hits parameter, if any.
*
Expand Down
Loading