[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog/help - ZCatalog.py:1.14.4.1

Chris McDonough chrism@zope.com
Fri, 3 Jan 2003 01:34:02 -0500


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog/help
In directory cvs.zope.org:/tmp/cvs-serv27194/ZCatalog/help

Modified Files:
      Tag: chrism-install-branch
	ZCatalog.py 
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).



=== Zope/lib/python/Products/ZCatalog/help/ZCatalog.py 1.14 => 1.14.4.1 ===
--- Zope/lib/python/Products/ZCatalog/help/ZCatalog.py:1.14	Wed Aug 14 18:25:15 2002
+++ Zope/lib/python/Products/ZCatalog/help/ZCatalog.py	Fri Jan  3 01:33:29 2003
@@ -178,6 +178,10 @@
 
           sort_order -- You can specify 'reverse' or 'descending'.
           Default behavior is to sort ascending.
+          
+          sort_limit -- An optimization hint to tell the catalog how many
+          results you are really interested in. See the limit argument
+          to the search method for more details.
 
         There are some rules to consider when querying this method:
 
@@ -210,4 +214,27 @@
     def __call__(REQUEST=None, **kw):
         """
         Search the catalog, the same way as 'searchResults'.
+        """
+
+    def search(query_request, sort_index=None, reverse=0, limit=None, merge=1):
+        """Programmatic search interface, use for searching the catalog from
+        scripts.
+            
+        query_request -- Dictionary containing catalog query. This uses the 
+        same format as searchResults.
+        
+        sort_index -- Name of sort index
+        
+        reverse -- Boolean, reverse sort order (defaults to false)
+        
+        limit -- Limit sorted result count to the n best records. This is an
+        optimization hint used in conjunction with a sort_index. If possible
+        ZCatalog will use a different sort algorithm that uses much less memory
+        and scales better then a full sort. The actual number of records
+        returned is not guaranteed to be <= limit. You still need to apply the
+        same batching to the results.
+
+        merge -- Return merged, lazy results (like searchResults) or raw 
+        results for later merging. This can be used to perform multiple
+        queries (even across catalogs) and merge and sort the combined results.
         """