With Django 1.6 and postgres and the module djorm-ext-pgfulltext
, I am trying to perform full text searches that use greedy matching(ie: app would match apple) instead of exact word matching.
I see that postgres has pg_trgm module(http://www.postgresql.org/docs/9.0/static/pgtrgm.html) for this(match 3 consecutive characters of search word). However, I am pretty stumped on how I would integrate/use this in djorm-ext-pgfulltext
. I know that SearchManager()
does take a config arguement, but I am not sure how I would use pg_trgm in it. I read over making my own configuration file enter link description here but I don't see a way to integrate pg_trgm
in there ether.
objects = SearchManager(
fields = ('name', 'description'),
config = 'pg_catalog.english', # this is default
search_field = 'search_index', # this is default
auto_update_search_field = True
)