Commit 51053edb authored by Mario Chirinos's avatar Mario Chirinos

unaccent

parent 90f76f90
......@@ -47,7 +47,7 @@ import shutil
import wordcloud
from stop_words import get_stop_words
from django.contrib.postgres.lookups import Unaccent
#from django.contrib.postgres.lookups import Unaccent
AUDIOPATH = "/home/geoint/M3_NFS/recordings/"
#-------------------------------------------------------------------------------
......@@ -95,7 +95,7 @@ def getNewsByRequest(request, values=None):
form = SearchForm(request.GET)
myQuery = ~Q()
myQuery = ~Q(config='unaccent')
if 'publishers' in request.GET and request.GET['publishers']!="None" and request.GET['publishers']!="" and request.GET['publishers']!="[]":
......@@ -114,7 +114,7 @@ def getNewsByRequest(request, values=None):
if "text" in request.GET and request.GET['text']!="None" and request.GET['text']!="":
# myQuery &= Q(text__search=request.GET['text'])
myQuery &= Q(search_vector__unaccent=request.GET['text'])
myQuery &= Q(search_vector=request.GET['text'])
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