I'm new to PostgreSQL, and I'm not sure how to make full-text search inaccurate . Not that it's too important, but I'm using Django. In other words, I'm looking for something like the following:
q = 'hello world'
queryset = Entry.objects.extra(
where=['body_tsv @@ plainto_tsquery(%s)'],
params=[q])
for entry in queryset:
print entry.title
where I list of entries should contain either "hello world" or something like that. Then the lists should be ordered according to how far their value is indicated on the indicated line. For example, I would like the query to include entries containing "Hello World", "hEllo world", "helloworld", "hell world", etc., with some kind of ranking indicating how far from each element is perfect, unchanging query string.
How would you do that?
source
share