1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""Search
15
16 Utilities to help build zcatalog indexes
17 """
18
19 __version__ = "$Revision: 1.3 $"[11:-2]
20
21 from Products.ManagableIndex import FieldIndex, KeywordIndex
22 from Products.ZenUtils.ExtendedPathIndex import ExtendedPathIndex
23 from Products.ZenUtils.MultiPathIndex import MultiPathIndex
24
26 index = FieldIndex(indexName)
27 index.PrenormalizeTerm = 'value/lower'
28 index.TermType = termType
29 return index
30
32 index = KeywordIndex(indexName)
33 index.PrenormalizeTerm = 'value/lower'
34 index.TermType = 'ustring'
35 index.TermTypeExtra = 'latin-1'
36 return index
37
39 index = KeywordIndex(indexName)
40 index.TermType = 'ustring'
41 index.TermTypeExtra = 'latin-1'
42 return index
43
45 index = FieldIndex(indexName)
46 index.TermType = 'ustring'
47 return index
48
51
54
58
61