[Zope-CMF] Catalog search problem

Andreas Jung andreas at andreas-jung.com
Thu Oct 16 12:32:31 EDT 2003


Try TextIndexNG2

-aj

--On Donnerstag, 16. Oktober 2003 12:26 Uhr -0400 Kevin Carlson 
<khcarlso at bellsouth.net> wrote:

> I am searching the portal_catalog using the following code:
>
> searchString = '"Keyword1 Keyword2"'
> res = context.portal_catalog({'SearchableText': searchString})
>
> I receive the following traceback which I can't make heads or tails out
> of.  Has anyone experienced this?  Ideas on resolution?
>
> By the way if I change the searchString to 'Keyword1 Keyword2', things
> work fine.  What I am trying to do is search on a phrase instead of
> getting each document that contains either of the two keywords.  I have
> looked at the TextIndexNG documentation and haven't come across any
> explanation of whether this is possible or not.
>
> If I run the code as above, it blows up on the line querying the catalog.
> I am using:
>
> Zope 2.6.1 (source distribution)
> Python 2.1.3
> CMF 1.2
> TextIndexNG 1.09
>
> Thanks,
>
> Kevin
>
> ---------------------
>
> Traceback (innermost last):
>
>     * Module ZPublisher.Publish, line 98, in publish
>     * Module ZPublisher.mapply, line 88, in mapply
>     * Module ZPublisher.Publish, line 39, in call_object
>     * Module Shared.DC.Scripts.Bindings, line 252, in __call__
>     * Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
>     * Module Products.PythonScripts.PythonScript, line 315, in _exec
>     * Module Script (Python), line 3, in test_script
>       *<PythonScript at /Portal/portal_skins/Test/test_script>*
>       *Line 3*
>     * Module Products.CMFCore.CatalogTool, line 193, in searchResults
>     * Module Products.ZCatalog.ZCatalog, line 619, in searchResults
>     * Module Products.ZCatalog.Catalog, line 732, in searchResults
>     * Module Products.ZCatalog.Catalog, line 480, in search
>     * Module Products.TextIndexNG.TextIndexNG, line 464, in _apply_index
>     * Module Products.TextIndexNG.ParseTree, line 117, in executeQuery
>     * Module Products.TextIndexNG.ResultSet, line 127, in phraseResultSets
>     * Module Products.TextIndexNG.ResultSet, line 159, in nearResultSets
>     * Module Products.TextIndexNG.TextIndexNG, line 658, in
>       positionsFromDocumentLookup
>     * Module Products.TextIndexNG.TextIndexNG, line 633, in
>       getDataFromObject
>     * Module OFS.Traversable, line 153, in unrestrictedTraverse
>       __traceback_info__: ([], 'Sample Document')
>     * Module OFS.ObjectManager, line 652, in __getitem__
>
>
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests







More information about the Zope-CMF mailing list