[Zope] 1- Unicode support for TextIndexNG, 2- Umlauts nor supported by QueryParser?

Juergen R. Plasser / Hexagon plasser@hexagon.at
Tue, 11 Jun 2002 16:57:28 +0200


1 - When I try to set Unicode support for an TextIndexNG index I get the=20
following error when indexing: TypeError: object of type 'module' is not=20
callable

Full trace:

Traceback (innermost last):
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 150, in =

publish_module
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 114, in =

publish
  File /usr/local/zope/2-5-0/lib/python/Zope/__init__.py, line 159, in=20
zpublisher_exception_hook
    (Object: )
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 98, in=20
publish
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/mapply.py, line 88, in=20
mapply
    (Object: manage_reindexIndex)
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 39, in=20
call_object
    (Object: manage_reindexIndex)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/ZCatalog.py, line =

455, in manage_reindexIndex
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/ZCatalog.py, line =

441, in reindexIndex
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/ZCatalog.py, line =

480, in catalog_object
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/Catalog.py, line=20
367, in catalogObject
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/TextIndexNG.py, line=20
305, in index_object
    (Object: Ort)
TypeError: object of type 'module' is not callable

2 -  When I try to search a TextIndexNG field with umlauts (here the german =

=FC) I get the following error:

Error Type: QueryParserError
Error Value: Illegal character '=FC'

Traceback (innermost last):
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 150, in =

publish_module
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 114, in =

publish
  File /usr/local/zope/2-5-0/lib/python/Zope/__init__.py, line 159, in=20
zpublisher_exception_hook
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 98, in=20
publish
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/mapply.py, line 88, in=20
mapply
    (Object: report_html)
  File /usr/local/zope/2-5-0/lib/python/ZPublisher/Publish.py, line 39, in=20
call_object
    (Object: report_html)
  File /usr/local/zope/2-5-0/lib/python/OFS/DTMLMethod.py, line 127, in=20
__call__
    (Object: report_html)
  File /usr/local/zope/2-5-0/lib/python/DocumentTemplate/DT_String.py, line =

473, in __call__
    (Object: report_html)
  File /usr/local/zope/2-5-0/lib/python/DocumentTemplate/DT_In.py, line=20
437, in renderwb
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/ZCatalog.py, line =

579, in searchResults
    (Object: Catalog)
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/Catalog.py, line=20
576, in searchResults
  File /usr/local/zope/2-5-0/lib/python/Products/ZCatalog/Catalog.py, line=20
470, in _indexedSearch
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/TextIndexNG.py, line=20
398, in _apply_index
    (Object: Ort)
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/TextIndexNG.py, line=20
425, in query
    (Object: Ort)
  File /usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/BaseParser.py, =

line 29, in __call__
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/parsers/PyQueryParser
/PyQueryParser.py, line 147, in parse
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/parsers/PyQueryParser
/yacc.py, line 195, in parse
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/parsers/PyQueryParser
/lex.py, line 320, in realtoken
  File=20
/usr/local/zope/2-5-0/lib/python/Products/TextIndexNG/parsers/PyQueryParser
/PyQueryParser.py, line 60, in t_error
QueryParserError: (see above)

The index field is configured like this:

Stemmer disabled
Splitter ZopeSplitter
Splitter: casefolding enabled
Splitter: index numbers disabled
Splitter: index single characters disabled
Splitter: max. length of splitted words 64
Default query parser PyQueryParser
Compressed lists disabled
Use converters disabled
Near distance  5
Similarity search disabled

Any hints? What can I do to force indexing of umlauts?`

Regards,
Juergen