pluk77 / SymfonySphinxBundle

Symfony bundle which provides integration of Sphinx or Manticore search engine with Symfony using SphinxQL
Other
5 stars 5 forks source link

Order reset for QueryBuilder #7

Open danaki opened 4 years ago

danaki commented 4 years ago

Since Sphinx returns document ID's in an ordered manner (if order is provided) and these ids then put to QueryBuilder which searches for entities using "IN" clause, the resulting order of documents retrieved from the database is random. And I guess this:

        if ($this->orderBy) {
            $this->queryBuilder->resetDQLPart('orderBy');
        }

in applyQueryBuilder() doesn't allow to fix the order.