We don't need to encode data in utf8 for Search
This commit is contained in:
parent
d6b2cad5b8
commit
d3327f13a2
|
@ -127,7 +127,7 @@ class Search:
|
||||||
note = models.Note.objects.get(pk=index)
|
note = models.Note.objects.get(pk=index)
|
||||||
|
|
||||||
self._indexContent(hashtable, index, note.text, 1)
|
self._indexContent(hashtable, index, note.text, 1)
|
||||||
self._indexContent(hashtable, index, note.title.encode('utf-8'), 5)
|
self._indexContent(hashtable, index, note.title, 5)
|
||||||
|
|
||||||
def _index_note(self, note, saveDatabase=True):
|
def _index_note(self, note, saveDatabase=True):
|
||||||
hashtable = self._loadDatabase()
|
hashtable = self._loadDatabase()
|
||||||
|
@ -173,7 +173,7 @@ class Search:
|
||||||
def search(self, string):
|
def search(self, string):
|
||||||
hashtable = self._loadDatabase()
|
hashtable = self._loadDatabase()
|
||||||
|
|
||||||
string = self._prepare_string(string.encode('utf-8'))
|
string = self._prepare_string(string)
|
||||||
|
|
||||||
wordlist = string.split(' ')
|
wordlist = string.split(' ')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user