Commit 4fe73f40 authored by Mario Chirinos's avatar Mario Chirinos

unaccent

parent bca0446a
...@@ -47,7 +47,7 @@ import shutil ...@@ -47,7 +47,7 @@ import shutil
import wordcloud import wordcloud
from stop_words import get_stop_words from stop_words import get_stop_words
from django.contrib.postgres.lookups import Unaccent
AUDIOPATH = "/home/geoint/M3_NFS/recordings/" AUDIOPATH = "/home/geoint/M3_NFS/recordings/"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
...@@ -114,7 +114,7 @@ def getNewsByRequest(request, values=None): ...@@ -114,7 +114,7 @@ def getNewsByRequest(request, values=None):
if "text" in request.GET and request.GET['text']!="None" and request.GET['text']!="": if "text" in request.GET and request.GET['text']!="None" and request.GET['text']!="":
# myQuery &= Q(text__search=request.GET['text']) # myQuery &= Q(text__search=request.GET['text'])
myQuery &= Q(search_vector=request.GET['text']) myQuery &= Q(Unaccent(search_vector)=Unaccent(request.GET['text']))
print (myQuery) print (myQuery)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment