[Patchew-devel] [PATCH 0/2] postgresql: use full text search

Paolo Bonzini posted 2 patches 3 weeks ago
Failed in applying to current master (apply log)
api/migrations/0040_postgres_fts.py | 26 +++++++++++++++++
api/migrations/__init__.py          | 15 ++++++++++
api/search.py                       | 44 +++++++++++++++++++++++------
patchew/settings.py                 |  3 ++
4 files changed, 80 insertions(+), 8 deletions(-)
create mode 100644 api/migrations/0040_postgres_fts.py

[Patchew-devel] [PATCH 0/2] postgresql: use full text search

Posted by Paolo Bonzini 3 weeks ago
We can use full text search with word stemming for subject searches,
and trigram search (which automatically optimizes LIKE '%foo%') for
sender and recipient search.  Both require creating an inverted
("GIN") index.  Django provides a GinIndex class, but I'm using
SQL manually to avoid breaking SQLite.

Unfortunately, there is a bug in Postgres that prevents using the
index for subject search.  Patch 2 works around it.

Paolo

Paolo Bonzini (2):
  use postgresql full text search
  work around bug in postgresql full text search

 api/migrations/0040_postgres_fts.py | 26 +++++++++++++++++
 api/migrations/__init__.py          | 15 ++++++++++
 api/search.py                       | 44 +++++++++++++++++++++++------
 patchew/settings.py                 |  3 ++
 4 files changed, 80 insertions(+), 8 deletions(-)
 create mode 100644 api/migrations/0040_postgres_fts.py

-- 
2.19.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel