#31296: Clarify what happens ------------------------------------------------+------------------------ Reporter: Baptiste Mispelon | Owner: nobody Type: Cleanup/optimization | Status: new Component: Documentation | Version: 3.0 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------------------+------------------------ The documentation for full text search [1] explains that you can pass a `config` parameter to both `SearchVector` and `SearchQuery` but it's not clear to me if you need to pass the same configuration to both or what happens if you pass two different configurations to each object.
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. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.4fd735a0de3140621ea4910820025e70%40djangoproject.com.