{{{
Dog.objects.annotate(search=SearchVector('name')).filter(search=RawSearchQuery(Lexeme('opt',
prefix=True)))
}}}
and combine `Lexeme`s together either ANDing, ORing instead of just
letting the user specify the query as a postgres string
(https://www.postgresql.org/docs/9.6/static/datatype-textsearch.html
#DATATYPE-TSQUERY)
{{{
Dog.objects.annotate(search=SearchVector('name')).filter(search=RawSearchQuery(Lexeme('opt',
prefix=True) + Lexeme('blah', invert=True))
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28041>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Joe Tsoi
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:1>
* type: Uncategorized => New feature
* component: Uncategorized => contrib.postgres
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8313 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:4>
* needs_docs: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:5>
* owner: Joe Tsoi => Karl Hobley
* needs_docs: 1 => 0
* needs_tests: 1 => 0
Comment:
[https://github.com/django/django/pull/12727 New PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:6>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:7>
* owner: Karl Hobley => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28041#comment:8>