Please tell me there is the following code:
public function search() { $this->load($this->searchParams); $query = new Query(); $items = $query->from('news') ->match($this->query) ->orderBy(['date_added' => SORT_DESC]) ->all(); $items = array_column($items,'id'); $query = News::find() ->where(['in', 'id', $items]); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => false, 'pagination' => [ 'pageSize' => 15 ] ]); return $dataProvider; } - Am I working with sphinx right? I give him a search query, get an array of id and do a selection of them.
- How to work with limit with sphinx? Returns only 20 records ... Get the current page and count based on the number of elements on the page?
- Or with sphinx I need to get not only id? and full volume of data and transfer them to DataProvider?
Thank you in advance.