[Zope] Searching Content Objects in Zope 3

Jim Vine jim_a_vine at yahoo.co.uk
Sat Jul 23 14:01:45 EDT 2005


Hello,

I've been working away on an application, and it's now
starting to take shape, based around a series of
content objects.

As recommended on this list I opted for Zope 3 to
build my app, and I'm finding it quite powerful.
However, I've hit a bit of a brick wall around
searching.

It seems from the documentation that ZCatalog is the
prefered way of doing a search in Zope 2, but that
this isn't implemented in Zope 3. I've got Philipp von
Weitershausen's (very good!) book, and he doesn't
implement a search for his recipe objects. I've also
been looking at the PDF of the Zope 3 Book (which I've
also found really useful) and I haven't spotted
searching of objects mentioned in that.

My search tool will need to take various criteria
(say, number of bedrooms, maximum rent, areas the
property can be located in) and scan through my
objects to find all the matches.

I think I can work out how to search through the
objects themselves in order to find the matches, the
real problem is taking in the criteria in the first
place. (Although, any tips provided on the searching
side of things would certainly be welcome too!) As a
'dummy run' at searching I created a View for my
PropertyFolder object that shows properties based on
specified criteria - I can get this to work OK, but I
have to put the criteria right into the Python code,
so clearly that's not acceptable...

I would be grateful for anything anyone could point me
to that would help me to build a tool to search my
content objects. Philipp mentions the use of Utilities
for searching, but beyond that, I don't know where to
start. Is it possible to use Interfaces to create data
entry schemas/forms for Utilities in the same way as
for objects? 

Any help, greatly appreciated.

Thanks,
Jim


	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


More information about the Zope mailing list