Reimplement similarity search using Solr #1714
Labels
Improvement
A functional improvement to an existing feature, that isn't urgently a bug
New feature
Something that doesn't yet exist in Freesound
We've been discussing for a long time how could we get rid of our custom similarity server (based on gaia) and move its current functionality to another service. Since last versions of Solr support nearest-neighbours (NN) search, we decided to move the similarity functionality to Solr. For this to happen, there are a number of considerations to take into account and steps to follow, some have already been done.
We mainly use gaia for similarity search, but we also use it for some advanced functionalities of the API through which users can implement complex search filters based on low-level audio descriptors (e.g., filter by
pitch variance
orbpm
), and also can specify a number of descriptors which establish a custom similarity metric which only takes into account these descriptors to sort the results of a query. When moving to Solr, some of these features will be lost, and also users will need to change their app implementations to achieve similar results. Therefore, some actions will need to be taken to notify users about these changes and also provide alternative ways to achieve similar results.Our current implementation of similarity search also uses gaia to apply some transformations to the audio descriptors that we calculate and convert them into a 100-dimension normalised vector used for the NN queries. If we get rid of gaia, we will need to move this functionality somewhere else so that we can continue generating these sound vectors. Also, we want to take this opportunity to introduce audio embeddings computed using pre-trained deep learning models to our similarity system, so we can test state of the art approaches to similarity search.
Here are some steps to carry out for the reimplementation of the similarity service:
content search
andcombined search
functionality from the API. Add a note in the API documentation and provide examples of how to implement an alternative solution. Send email to the API mailing list and also specifically notify users who use these API resources.tristimulus
descriptor has been used for mapping to RGB in several experiments, ormfcc mean
. Note that after removing gaia only the descriptors that we store in the DB will be available as metadata information for sounds, so all the relevant documentation will also need to be updated.content search
andcombined search
functionality from the API (only after the whole process has been finished and we have been able to provide working examples in the documentation about how to implement alternatives). Also remove this functionality from the official API clients.Sound.similarity_state
to specify when a sound is ready for similarity (using the new similarity). In Solr-based similarity search #1753 we did not implement this because this field is used by old similarity. But when old similarity is completely gone, then we can do it.The text was updated successfully, but these errors were encountered: