Ivan Horvath wrote:
i have to provide some filter function in our system.
i've checked the hurry.query solution
obj1.property = "As Built Documentation"
obj2.property = "Planning Documentation"
obj3.property = "As Built Drawing"
i would like to filter my objects in the following ways:
filter for substring.
when i make a filter for this property with the following expr.: "As Built"
i would like to get obj1, obj3 back as result
how is it possible? query.Eq or AnyOf doesn't give back anything.
You may want to look at hurry.query.Text. If you index something using a
full text index (from zope.app.catalog.text import TextIndex) you can do
such partial matching.
This does presume you do have the intids and catalog all set up in your
own code. Does hurry.query.Eq work when you feed it a complete text,
such as "As Built Documentation"?
It may also be that you want to reorganize your objects slightly so that
you have *two* fields, one 'As Built' and one 'Document' or 'Drawing'.
It could be that you're trying to put information into one field that
really should be in multiple fields. If you do that, you can use the
Field index and query.Eq.
Zope3-users mailing list