private function getFulltextFilter(\Magento\Framework\Api\Search\SearchCriteriaInterface $searchCriteria)
    {
        $queryText = null;

        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
            foreach ($filterGroup->getFilters() as $filter) {
                if ($filter->getField() == "search_term") {
                    $queryText = $filter->getValue();
                }
            }
        }

        return $queryText;
    }
private function getFulltextFilter(\Magento\Framework\Api\Search\SearchCriteriaInterface $searchCriteria)
    {
        $queryText = null;

        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
            foreach ($filterGroup->getFilters() as $filter) {
                if ($filter->getField() == "search_term") {
                    $queryText = $filter->getValue();
                }
            }
        }

        return $queryText;
    }
private function getFulltextFilter ( \ Magento \ Framework \ Api \ Search \ SearchCriteriaInterface $ searchCriteria ) { $ queryText = null ; foreach ( $ searchCriteria -> getFilterGroups ( ) as $ filterGroup ) { foreach ( $ filterGroup -> getFilters ( ) as $ filter ) { if ( $ filter -> getField ( ) == "search_term" ) { $ queryText = $ filter -> getValue ( ) ; } } } return $ queryText ; }
Extract fulltext search query from search criteria.

@param \Magento\Framework\Api\Search\SearchCriteriaInterface $searchCriteria Search criteria.

@return NULL|string
Extract fulltext search query from search criteria .