[Zope] ZCatalog - OR'ing on different colums (indices)

Aleksander Salwa ololo@zeus.polsl.gliwice.pl
Fri, 25 Aug 2000 16:59:06 +0200 (CEST)


Is there any better method of OR'ing on differend indices in quering
ZCatalog, then the method described in 'Advanced ZCatalog Searching'
How-To:

<dtml-let res1="MyCatalog(title=userInput)"
          res2="MyCatalog(PrincipiaSearchSource=userInput)"
          res3="MyCatalog(someProperty=userInput)"
          results=
           "res1[:_.len(res1)] + res2[:_.len(res2)] + res3[:_.len(res3)]">

   <dtml-in results>
      ...
   </dtml-in>

</dtml-let>

This seems to me too expensive - here three searches are made.
Is there - or should be added - any support for it in ZCatalog ?

Another fault of this method are superfluous repetitions in results - if
some catalogued object matches search pattern on more then one index.

It seems to me to be common case, when we show to user simple search form
with only one input (that is where 'userInput' came from) and 'Go!'
button. User don't want to know, that we have our data splited in many
properties. But on Zope side it's very good to have it structured in that
way - so how to reconcile these things ?

ololo@zeus.polsl.gliwice.pl

/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/