[Zope-dev] ZCatalog

sean.upton@uniontrib.com sean.upton@uniontrib.com
Thu, 06 Dec 2001 13:47:55 -0800


Personally, I am of the opinion that sending a Catalog raw queries is not
very useful for really powerful searching... hopefully this changes in the
future, but for now...

Since catalog doesn't have anything built-in that does this, other than
globbing vocabularies, you have to do this within your appliction.  What you
want to do is hijack and rewrite user queries before sending them through a
catalog query...  for example:

word = 'dancing'
newword = re.sub('ing$', '*', word)
#newword is now 'danc*' which

This would work with plural words as well, as long as you have a useful set
of patterns for word endings...  

For alternate spellings, abbreviations, and synonyms you would need to
create lookup tables and indexed methods that took advantage of them for
text indexes.  This works only for text indexes though...  

In summary, use query rewrites for word endings and auto-wildcarding (the
work is done at search time)... and use methods that weight and translate
your text in your product code (the work is done at index time)...

Sean

-----Original Message-----
From: Dirk Datzert [mailto:Dirk.Datzert@rasselstein-hoesch.de]
Sent: Thursday, December 06, 2001 1:38 PM
To: sean.upton@uniontrib.com
Cc: zope-dev@zope.org
Subject: Re: [Zope-dev] ZCatalog


the search engine htdig has a fuzzy feature which automatically search for
different endings or alternative spelling of a word, based on the ispell
algorithm

sean.upton@uniontrib.com schrieb:

> what do you mean by fuzzy?  Do you mean with wildcards, NL, or something
> else?
>
> -----Original Message-----
> From: Dirk Datzert [mailto:Dirk.Datzert@rasselstein-hoesch.de]
> Sent: Thursday, December 06, 2001 1:03 PM
> To: zope-dev@zope.org
> Subject: [Zope-dev] ZCatalog
>
> Hi,
>
> I'm looking for a howto or a hint for fuzzy search in german and english
> with ZCatalog / CatalogQuery
>
> Can anybody sent me a URL ?
>
> Thanks
> Dirk
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )