Questions tagged [django-elasticsearch-dsl]

7 questions
0
votes
0 answers

Index through multiple models through django-elasticsearch-dsl

I am trying to create an index which would be used to autocomplete, and basically stores the aggregation of three model field These are my models below class SmallShop(models.Model): small_name = models.TextField(blank=True, null=True) …
0
votes
0 answers

How can I stop django-elasticsearch-dsl search_index command from taking input?

In order for django-elastic-dsl to index the documents we have to run python manage.py search_index --rebuild on every deploy. so I faced an issue having docker-compose executing my django project and that is: File…
0
votes
0 answers

Get ElasticSearch suggestion based on filtered data in Django

I am using django-elasticsearch-dsl for integrating elastic search. I have an API that returns name suggestions using elastic search suggest feature. It's working as expected but the issue is I can't apply a specific filter. For example, I want to…
0
votes
0 answers

Django ElasticSearch DSL How to sort by another document

In Django, I have 2 models Keyword and KeywordPopularity. class Keyword(models.Model): name = models.CharField(max_length=50) class KeywordPopularity(models.Model): keyword = models.ForeignKey(Keyword, on_delete=models.CASCADE,…
0
votes
0 answers

elasticsearch-dsl - how to get sequence number and primary term?

I have a containerised setup. I have a web container running django and separate es container. I am using the following in my web container elasticsearch-dsl==7.4.0 django-elasticsearch-dsl==7.2.2 I have a django model, a document (as per…
ron_g
  • 1,474
  • 2
  • 21
  • 39
0
votes
0 answers

script not working as expected in django_elastic_dsl,

model shop class Shop(models.Model): name = models.CharField(max_length=100) lat = models.DecimalField( null=True, blank=True, decimal_places=15, max_digits=19, default=0 ) long = models.DecimalField( null=True, blank=True,…
0
votes
0 answers

Create Document field inside Django elastic search for calculate properties

I have three models inside my Django model class A(BaseModel): b = models.ForeignKey(B, null=True, blank=True, on_delete=models.SET_NULL) c = models.ForeignKey(C, null=True, blank=True, on_delete=models.SET_NULL) @property def…
Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97