- Issue created by @tobias märz
- Merge request !200Issue #3495139 by tobias maerz - Added seed to search query → (Merged) created by tobias märz
- 🇦🇹Austria drunken monkey Vienna, Austria
drunken monkey → made their first commit to this issue’s fork.
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks for suggesting this improvement!
As the test fails show, though, your implementation is a bit rough. Instead of forcing a new property on the database query object we can just use itsaddMetaData()
method. I updated the MR accordingly, please test/review.
I also added support for Postgres. SQLite, however, doesn’t seem to support random seeds (yet), see here.Before I can merge this it still needs tests, though. Would you be able to add some to
\Drupal\Tests\search_api_db\Kernel\BackendTest::searchWithRandom()
? (We’ll just have to make sure to skip them for SQLite.) - 🇩🇪Germany tobias märz
I don't have much experience in the code of the SearchAPI module. I tried it, but couldn't find a way to add the metadata to the query. Can you implement the test?
- 🇩🇪Germany tobias märz
Thought a bit wrong, added test for random sort with seed.
- 🇦🇹Austria drunken monkey Vienna, Austria
Great job, thanks a lot!
Unfortunately it’s not that easy anymore to test against other databases (after the switch to GitLab CI) but tests against MySQL pass and any problems with Postgres or SQLite should be reported on the weekend when the scheduled pipelines run.
I just did a bit of code cleanup and will now merge.
Thanks again! -
drunken monkey →
committed ede2136e on 8.x-1.x authored by
tobias märz →
Issue #3495139 by tobias märz, drunken monkey: Added support for seeds...
-
drunken monkey →
committed ede2136e on 8.x-1.x authored by
tobias märz →
Automatically closed - issue fixed for 2 weeks with no activity.