[Zope3-checkins] SVN: Zope3/branches/jim-index-restructure-2004-12/src/zope/index/ Renamed apply_index to apply.

Jim Fulton jim at zope.com
Mon Dec 6 16:52:05 EST 2004


Log message for revision 28576:
  Renamed apply_index to apply.
  

Changed:
  U   Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/README.txt
  U   Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/index.py
  U   Zope3/branches/jim-index-restructure-2004-12/src/zope/index/interfaces/__init__.py

-=-
Modified: Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/README.txt
===================================================================
--- Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/README.txt	2004-12-06 19:11:35 UTC (rev 28575)
+++ Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/README.txt	2004-12-06 21:52:05 UTC (rev 28576)
@@ -20,29 +20,29 @@
     >>> index.index_doc(8, 43)
     >>> index.index_doc(9, 15)
 
-Fied indexes are searched with apply_index.  The argument is a tuple
+Fied indexes are searched with apply.  The argument is a tuple
 with a minimum and maximum value:
 
-    >>> index.apply_index((30, 70))
+    >>> index.apply((30, 70))
     IISet([3, 4, 5, 7, 8])
 
 Open-ended ranges can be provided by provinding None as an end point:
 
-    >>> index.apply_index((30, None))
+    >>> index.apply((30, None))
     IISet([2, 3, 4, 5, 6, 7, 8])
 
-    >>> index.apply_index((None, 70))
+    >>> index.apply((None, 70))
     IISet([0, 1, 3, 4, 5, 7, 8, 9])
 
-    >>> index.apply_index((None, None))
+    >>> index.apply((None, None))
     IISet([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
 
 To do an exact value search, supply equal minimum and maximum values:
 
-    >>> index.apply_index((30, 30))
+    >>> index.apply((30, 30))
     IISet([4, 7])
 
-    >>> index.apply_index((70, 70))
+    >>> index.apply((70, 70))
     IISet([])
 
 Field indexes support basic statistics:
@@ -54,13 +54,13 @@
 
 Documents can be reindexed:
 
-    >>> index.apply_index((15, 15))
+    >>> index.apply((15, 15))
     IISet([9])
     >>> index.index_doc(9, 14)
 
-    >>> index.apply_index((15, 15))
+    >>> index.apply((15, 15))
     IISet([])
-    >>> index.apply_index((14, 14))
+    >>> index.apply((14, 14))
     IISet([9])
     
 Documents can be unindexed:
@@ -76,7 +76,7 @@
     >>> index.wordCount()
     7
 
-    >>> index.apply_index((30, 70))
+    >>> index.apply((30, 70))
     IISet([3, 4, 5])
 
 Unindexing a document id that isn't present is ignored:
@@ -96,5 +96,5 @@
     >>> index.wordCount()
     0
 
-    >>> index.apply_index((30, 70))
+    >>> index.apply((30, 70))
     IISet([])

Modified: Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/index.py
===================================================================
--- Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/index.py	2004-12-06 19:11:35 UTC (rev 28575)
+++ Zope3/branches/jim-index-restructure-2004-12/src/zope/index/field/index.py	2004-12-06 21:52:05 UTC (rev 28576)
@@ -95,5 +95,5 @@
 
         self._num_docs.change(-1)
 
-    def apply_index(self, query):
+    def apply(self, query):
         return multiunion(self._fwd_index.values(*query))        

Modified: Zope3/branches/jim-index-restructure-2004-12/src/zope/index/interfaces/__init__.py
===================================================================
--- Zope3/branches/jim-index-restructure-2004-12/src/zope/index/interfaces/__init__.py	2004-12-06 19:11:35 UTC (rev 28575)
+++ Zope3/branches/jim-index-restructure-2004-12/src/zope/index/interfaces/__init__.py	2004-12-06 21:52:05 UTC (rev 28576)
@@ -50,14 +50,14 @@
 
 class IIndexSearch(Interface):
 
-    def apply_index(query):
+    def apply(query):
         """Apply an index to the given query
 
         The type if the query is index specific.
 
         TODO
             This is somewhat problemetic. It means that application
-            code that calls apply_index has to be aware of the
+            code that calls apply has to be aware of the
             expected query type. This isn't too much of a problem now,
             as we have no more general query language nor do we have
             any sort of automatic query-form generation.



More information about the Zope3-Checkins mailing list