Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: MoinMoin/storage/middleware/indexing.py

Issue 10976043: Suggestions-as-you-type
Patch Set: Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « MoinMoin/apps/frontend/views.py ('k') | MoinMoin/templates/ajaxsearch.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright: 2011 MoinMoin:RonnyPfannschmidt 1 # Copyright: 2011 MoinMoin:RonnyPfannschmidt
2 # Copyright: 2011 MoinMoin:ThomasWaldmann 2 # Copyright: 2011 MoinMoin:ThomasWaldmann
3 # Copyright: 2011 MoinMoin:MichaelMayorov 3 # Copyright: 2011 MoinMoin:MichaelMayorov
4 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details. 4 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
5 5
6 """ 6 """
7 MoinMoin - indexing middleware 7 MoinMoin - indexing middleware
8 8
9 The backends and stores moin uses are rather simple, it is mostly just a 9 The backends and stores moin uses are rather simple, it is mostly just a
10 unsorted / unordered bunch of revisions (meta and data) with iteration. 10 unsorted / unordered bunch of revisions (meta and data) with iteration.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SIZE: NUMERIC(stored=True), 292 SIZE: NUMERIC(stored=True),
293 # ACTION from metadata 293 # ACTION from metadata
294 ACTION: ID(stored=True), 294 ACTION: ID(stored=True),
295 # tokenized COMMENT from metadata 295 # tokenized COMMENT from metadata
296 COMMENT: TEXT(stored=True), 296 COMMENT: TEXT(stored=True),
297 # SUMMARY from metadata 297 # SUMMARY from metadata
298 SUMMARY: TEXT(stored=True), 298 SUMMARY: TEXT(stored=True),
299 # DATAID from metadata 299 # DATAID from metadata
300 DATAID: ID(stored=True), 300 DATAID: ID(stored=True),
301 # data (content), converted to text/plain and tokenized 301 # data (content), converted to text/plain and tokenized
302 CONTENT: TEXT(stored=True), 302 CONTENT: TEXT(stored=True, spelling=True),
303 } 303 }
304 304
305 latest_revs_fields = { 305 latest_revs_fields = {
306 # ITEMID from metadata - as there is only latest rev of same item he re, it is unique 306 # ITEMID from metadata - as there is only latest rev of same item he re, it is unique
307 ITEMID: ID(unique=True, stored=True), 307 ITEMID: ID(unique=True, stored=True),
308 # unmodified list of ITEMLINKS from metadata 308 # unmodified list of ITEMLINKS from metadata
309 ITEMLINKS: ID(stored=True), 309 ITEMLINKS: ID(stored=True),
310 # unmodified list of ITEMTRANSCLUSIONS from metadata 310 # unmodified list of ITEMTRANSCLUSIONS from metadata
311 ITEMTRANSCLUSIONS: ID(stored=True), 311 ITEMTRANSCLUSIONS: ID(stored=True),
312 # tokenized ACL from metadata 312 # tokenized ACL from metadata
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 def __cmp__(self, other): 1241 def __cmp__(self, other):
1242 if self[REVID] == other[REVID]: 1242 if self[REVID] == other[REVID]:
1243 return 0 1243 return 0
1244 return cmp(self[MTIME], other[MTIME]) 1244 return cmp(self[MTIME], other[MTIME])
1245 1245
1246 def __len__(self): 1246 def __len__(self):
1247 return 0 # XXX 1247 return 0 # XXX
1248 1248
1249 def __repr__(self): 1249 def __repr__(self):
1250 return "Meta _doc: {0!r} _meta: {1!r}".format(self._doc, self._meta) 1250 return "Meta _doc: {0!r} _meta: {1!r}".format(self._doc, self._meta)
OLDNEW
« no previous file with comments | « MoinMoin/apps/frontend/views.py ('k') | MoinMoin/templates/ajaxsearch.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b