FAQ¶
You will find a lot of useful information in the documentation.
Additionally, all raised issues that were questions have been marked as question, so you could take a look at the closed (question) issues.
Questions and answers¶
Question
Is it possible to search sub string in word?
How to implement partial/fuzzy search?
Answer
Yes. There are many ways doing this in Elasticsearch.
To mention a couple:
You could use partial matching using NGrams. Partially shown here. The basic idea.
Use contains functional filter.
Question
Can we use Django REST Framework serializers.ModelSerializer
directly?
Answer
No, but you could use serializers.Serializer
. Read the docs.
Question
How can I order search results overall relevance
Answer
That’s _score
. See the following example.
ordering = ('_score', 'id', 'title', 'price',)
In the given example, results are sorted by the score
(which is relevance),
then by id
, title
and price
.
Question
How can I separate my development/production/acceptance/test indexes?
Answer
It’s documented here.
Question
How can I sync my database with Elasticsearch indexes.
Answer
It’s documented here.
Question
I keep getting [FORBIDDEN/12/index read-only / allow delete (api)]
error
when saving models despite having blocks={'read_only_allow_delete': None}
,
in settings.
Answer
Once of the possible reasons for the mentioned symptom might be low disk space.