Commit aeb8c0bc authored by Michel Pelletier's avatar Michel Pelletier

Fixed object unindexing

and very subtle URL bug
parent 364ec6ac
...@@ -113,26 +113,28 @@ class Catalog(Item): ...@@ -113,26 +113,28 @@ class Catalog(Item):
self.title=title self.title=title
self._ztable=ZTablesCore.ZTable(id) self._ztable=ZTablesCore.ZTable(id)
# create a static set of table contents and indexes to go with
# them # them
schema = [('id', 'FieldIndex', 's'), schema = [('id', 'FieldIndex', 's', None),
('url', 'FieldIndex', 's'), ('url', 'FieldIndex', 's', 1),
('title', 'TextIndex', 's'), ('title', 'TextIndex', 's', None),
('meta_type', 'FieldIndex', 's'), ('meta_type', 'FieldIndex', 's', None),
('last_modified', 'TextIndex', 'd'), ('last_modified', 'TextIndex', 'd', None),
('subject', 'TextIndex', 's'), ('subject', 'TextIndex', 's', None),
('description', 'TextIndex', 's'), ('description', 'TextIndex', 's', None),
('date', 'TextIndex', 'd'), ('date', 'TextIndex', 'd', None),
('reviewed', 'FieldIndex', 'i'), ('reviewed', 'FieldIndex', 'i', None),
] ]
uindex = [] uindex = []
utype = [] utype = []
for name, index, type in schema: call = []
for name, index, type, ci in schema:
self._ztable.addColumn(name) self._ztable.addColumn(name)
uindex.append(index) uindex.append(index)
utype.append(type) utype.append(type)
call.append(ci)
# create an orphan index for text_content. A table row will # create an orphan index for text_content. A table row will
# not get created but an index will. # not get created but an index will.
...@@ -140,7 +142,7 @@ class Catalog(Item): ...@@ -140,7 +142,7 @@ class Catalog(Item):
self._ztable._data.setOrphanIndex('text_content', 'TextIndex', self._ztable._data.setOrphanIndex('text_content', 'TextIndex',
call_methods=1) call_methods=1)
self._ztable.update_database_schema(uindex, utype) self._ztable.update_database_schema(uindex, utype, call)
def searchResults(self, REQUEST=None, used=None, def searchResults(self, REQUEST=None, used=None,
query_map={ query_map={
......
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