﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27899	Phrase search query for Postgres full text search	Ilya Semenov	Greg Allensworth	"Postgres 9.6 now supports phrase search with `... @@ phraseto_tsquery('hello world')`. It would be great if Django supported it natively.

Currently, `django.contrib.postgres.search.SearchQuery` hard-codes SQL lookup formatting:

{{{#!python
class SearchQuery(SearchQueryCombinable, Value):
    def as_sql(self, compiler, connection):
        ...
            template = 'plainto_tsquery({}::regconfig, %s)'.format(config_sql)
}}}

I believe the lookup function should be taken from a class level variable instead, and two more classes should be introduced: `PhraseSearchQuery` using `phraseto_tsquery`, and `RawSearchQuery` using `to_tsquery`."	New feature	closed	contrib.postgres	dev	Normal	fixed			Accepted	1	0	0	0	0	0
