[Zope] searching
Jaroslav Lukesh
lsh@wo.cz
Wed, 16 Oct 2002 11:27:33 +0200
Sure. Add Zcatalog, select appropriate fields (blow out principia*, you d=
o
not need for that) and make search interface.Do not forget define both
Indexes nad Metadata.=20
But where I can define filename field as Andreas reccomend?
Or you could use path index:
Path Indexes index the physical path of a sequence of objects. A Path
Index will return all objects that match a partital path specified in a
search query.=20
Or you should use pure DTML solution (I love DTML solutions :):
<dtml-in "yourZcatalog()">
<dtml-let "Zfilename=3DyourZcatalog.getpath(data_record_id_)">
<dtml-if "_.string.find(_['Zfilename'],'cow')>-1">Found *cow*: <dtml-var
Zfilename><br></dtml-if>
</dtml-let>
</dtml-in>
Not tried, but it may work.
Regards JL.
----------
Odes=EDlatel: Andreas Jung <andreas@andreas-jung.com>
Keyword indexes don't support wildcards. You must create
a TextIndex instead.
--On Mittwoch, 16. Oktober 2002 00:53 -0700 "michael.ta=F1ag"=20
<almightymike@yahoo.com> wrote:
> Is there a way in which I could serach for files inside zope using a
> keyword. For example I type in "cow" and it will search filenames with
> the word cow in it, like "cowhead.doc" and "da cow boy.pdf". Can Z
> Catalog do this?