mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
389 stars 195 forks source link

Invesigate in-memory Xapian indexes for test environment #6059

Open gbp opened 3 years ago

gbp commented 3 years ago

Xapian Ruby bindings can create in-memory search indexes and these should be faster for our current approach of writing test index to disk and restoring before each spec.

The xapian_db gem has this feature but doesn't it yet supports the Xapian 1.4.x which we use. I have tested and gem's tests pass when using xapian-full-alaveteli bindings instead of the 1.2.x ones provided an older version of xapian-ruby.

It might be worth seeing if we could swap out our legacy acts_as_xapian gem as part of this invesigation.

gbp commented 3 years ago

https://getting-started-with-xapian.readthedocs.io/en/latest/concepts/indexing/databases.html?highlight=memory#in-memory-databases

does not support all of Xapian’s features (such as spelling correction, synonyms or replication)

garethrees commented 3 years ago

Guess we should close this given the above?

gbp commented 3 years ago

Still worth considering if this would speed up running the test suite as these features aren't always necessary on the test environment.