In other words, is there a difference between the following 3 scenarios:
{{{#!python
# from the documentation
Entry.objects.annotate(
... search=SearchVector('body_text', config='french'),
... ).filter(search=SearchQuery('œuf', config='french'))
Entry.objects.annotate(
... search=SearchVector('body_text', config='french'),
... ).filter(search=SearchQuery('œuf'))
Entry.objects.annotate(
... search=SearchVector('body_text'),
... ).filter(search=SearchQuery('œuf', config='french'))
}}}
And also, what happens when you try different configurations in the same
query:
{{{#!python
Entry.objects.annotate(
... search=SearchVector('body_text', config='english'),
... ).filter(search=SearchQuery('œuf', config='french'))
}}}
[1] https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search
/#changing-the-search-configuration
--
Ticket URL: <https://code.djangoproject.com/ticket/31296>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: ChillarAnand (added)
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31296#comment:1>
* status: new => closed
* needs_docs: 1 => 0
* resolution: => wontfix
Comment:
Baptiste, thanks for this ticket, however it's an extensive topic and IMO
[https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search
/#changing-the-search-configuration the current explanation] is sufficient
for Django documentation. You should use PostgreSQL's docs for more
complicated scenarios e.g. using different configs.
--
Ticket URL: <https://code.djangoproject.com/ticket/31296#comment:2>