[Zope-dev] Catalog in 2.3.1
Adrian Hungate
ahungate@acucorp.com
Thu, 19 Apr 2001 01:08:42 -0700
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C0C8A7.F41A6AC0
Content-Type: text/plain;
charset="iso-8859-1"
Are there some problems with the new catalog?
I have spotted two possible problems:
1) In CatalogAware, there is a function reindex_all, which appears to have a
few problems, like calling index_object instead of reindex_object. Also, why
"sub = self.objectValues()" when sub is never used?
2) If I search a text index for a value that it does not contain, I get
nothing back (No surprises there), but if I search for a word that is a
substring of a word in the index, I get a Type Error (expected integer key).
Did I do something wrong, or have I hit a bug?
Here is the traceback of the following search. A Title index that contains
the word "wibble", search for the single word "wib":
Traceback (innermost last):
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 223, in
publish_module
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in
publish
File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: catalog_support)
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in
publish
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: results)
File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: results)
File C:\PROGRA~1\WebSite\lib\python\App\special_dtml.py, line 127, in
__call__
(Object: results)
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line
538, in __call__
(Object: results)
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Let.py, line 146,
in render
(Object: rs="Catalog.searchResults(REQUEST)")
File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 334,
in eval
(Object: Catalog.searchResults(REQUEST))
(Info: REQUEST)
File <string>, line 0, in ?
File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line
535, in searchResults
(Object: Traversable)
File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line
651, in searchResults
File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line
542, in _indexedSearch
File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 513,
in _apply_index
File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 576,
in query
File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 616,
in evaluate
File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 448,
in __getitem__
TypeError: (see above)
--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited
------_=_NextPart_001_01C0C8A7.F41A6AC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>Catalog in 2.3.1</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Are there some problems with the new catalog?</FONT>
</P>
<P><FONT SIZE=3D2>I have spotted two possible problems:</FONT>
<BR><FONT SIZE=3D2>1) In CatalogAware, there is a function reindex_all, =
which appears to have a few problems, like calling index_object instead =
of reindex_object. Also, why "sub =3D self.objectValues()" =
when sub is never used?</FONT></P>
<P><FONT SIZE=3D2>2) If I search a text index for a value that it does =
not contain, I get nothing back (No surprises there), but if I search =
for a word that is a substring of a word in the index, I get a Type =
Error (expected integer key). Did I do something wrong, or have I hit a =
bug?</FONT></P>
<P><FONT SIZE=3D2>Here is the traceback of the following search. A =
Title index that contains the word "wibble", search for the =
single word "wib":</FONT></P>
<P><FONT SIZE=3D2>Traceback (innermost last):</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 223, in =
publish_module</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in =
publish</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in =
zpublisher_exception_hook</FONT>
<BR><FONT SIZE=3D2> (Object: catalog_support)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in =
publish</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in =
mapply</FONT>
<BR><FONT SIZE=3D2> (Object: results)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in =
call_object</FONT>
<BR><FONT SIZE=3D2> (Object: results)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\App\special_dtml.py, line 127, in =
__call__</FONT>
<BR><FONT SIZE=3D2> (Object: results)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line 538, =
in __call__</FONT>
<BR><FONT SIZE=3D2> (Object: results)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Let.py, line 146, in =
render</FONT>
<BR><FONT SIZE=3D2> (Object: =
rs=3D&quot;Catalog.searchResults(REQUEST)&quot;)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 334, =
in eval</FONT>
<BR><FONT SIZE=3D2> (Object: =
Catalog.searchResults(REQUEST))</FONT>
<BR><FONT SIZE=3D2> (Info: REQUEST)</FONT>
<BR><FONT SIZE=3D2> File &lt;string&gt;, line 0, in =
?</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line 535, =
in searchResults</FONT>
<BR><FONT SIZE=3D2> (Object: Traversable)</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line 651, =
in searchResults</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line 542, =
in _indexedSearch</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 513, in =
_apply_index</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 576, in =
query</FONT>
<BR><FONT SIZE=3D2> File =
C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 616, in =
evaluate</FONT>
<BR><FONT SIZE=3D2> File C:\PROGRA~1\WebSite\lib\python\SearchInde=
x\UnTextIndex.py, line 448, in __getitem__</FONT>
<BR><FONT SIZE=3D2>TypeError: (see above)</FONT>
</P>
<P><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Adrian Hungate</FONT>
<BR><FONT SIZE=3D2>Manager, European I.S.</FONT>
<BR><FONT SIZE=3D2>Acucorp UK Limited</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C0C8A7.F41A6AC0--