Commit c34256f9 authored by Casey Duncan's avatar Casey Duncan

Added api to retrieve the indexed field name from the index.

Updated Overview managment screen so it shows more info about the index.
parent 94f84650
......@@ -51,7 +51,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
meta_type = 'ZCTextIndex'
manage_options = (
{'label': 'Settings', 'action': 'manage_main'},
{'label': 'Overview', 'action': 'manage_main'},
)
query_options = ['query']
......@@ -170,6 +170,10 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
def getIndexType(self):
"""Return index type string"""
return getattr(self, '_index_type', self._index_factory.__name__)
def getFieldName(self):
"""Return indexed attribute name"""
return self._fieldname
InitializeClass(ZCTextIndex)
......
......@@ -2,7 +2,15 @@
<dtml-var manage_tabs>
<p class="form-help">
The ZCTextIndex Lexicon in use by this index is:
Name of attribute indexed:
<em><dtml-var getFieldName></em>
</p>
<p class="form-help">
Index type:
<em><dtml-var getIndexType></em>
</p>
<p class="form-help">
ZCTextIndex Lexicon used:
<em><dtml-var expr="lexicon.getId()"></em>
</p>
<p class="form-help">
......
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