Dénote

Dénote Commit Details

Date:2016-06-23 18:02:09 (6 years 11 months ago)
Author:Grégory Soutadé
Branch:master
Commit:d3327f13a23a7d6582e89f4bd29627e9992761c1
Parents: d6b2cad5b85279fe24ba7860303e3a05540a3a1c
Message:We don't need to encode data in utf8 for Search

Changes:
Mdenote/search.py (2 diffs)

File differences

denote/search.py
127127
128128
129129
130
130
131131
132132
133133
......
173173
174174
175175
176
176
177177
178178
179179
note = models.Note.objects.get(pk=index)
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):
hashtable = self._loadDatabase()
def search(self, string):
hashtable = self._loadDatabase()
string = self._prepare_string(string.encode('utf-8'))
string = self._prepare_string(string)
wordlist = string.split(' ')

Archive Download the corresponding diff file

Branches

Tags