1
2
3
4
5
6
7
8
9
10
11 __doc__="""Search
12
13 Utilities to help build zcatalog indexes
14 """
15
16 from Products.ManagableIndex import FieldIndex, KeywordIndex
17 from Products.ZenUtils.ExtendedPathIndex import ExtendedPathIndex
18 from Products.ZenUtils.MultiPathIndex import MultiPathIndex
19
21 index = FieldIndex(indexName)
22 index.PrenormalizeTerm = 'value/lower'
23 index.TermType = termType
24 return index
25
27 index = KeywordIndex(indexName)
28 index.PrenormalizeTerm = 'value/lower'
29 index.TermType = 'ustring'
30 index.TermTypeExtra = 'latin-1'
31 return index
32
34 index = KeywordIndex(indexName)
35 index.TermType = 'ustring'
36 index.TermTypeExtra = 'latin-1'
37 return index
38
40 index = FieldIndex(indexName)
41 index.TermType = 'ustring'
42 return index
43
46
49
53
56