[Zope3-checkins] SVN: Zope3/trunk/src/zope/index/interfaces/__init__.py Added a clear method to IInjection

Jim Fulton jim at zope.com
Sun Aug 29 16:55:19 EDT 2004


Log message for revision 27339:
  Added a clear method to IInjection
  
  Changed unindex_doc to ignore docids not in the index
  


Changed:
  U   Zope3/trunk/src/zope/index/interfaces/__init__.py


-=-
Modified: Zope3/trunk/src/zope/index/interfaces/__init__.py
===================================================================
--- Zope3/trunk/src/zope/index/interfaces/__init__.py	2004-08-29 20:55:10 UTC (rev 27338)
+++ Zope3/trunk/src/zope/index/interfaces/__init__.py	2004-08-29 20:55:19 UTC (rev 27339)
@@ -21,11 +21,11 @@
 class IInjection(Interface):
     """Interface for injecting documents into an index."""
 
-    def index_doc(docid, texts):
+    def index_doc(docid, doc):
         """Add a document to the index.
 
         docid: int, identifying the document
-        texts: list of unicode, the text to be indexed in a list
+        doc: the document to be indexed
         return: None
 
         This can also be used to reindex documents.
@@ -37,9 +37,14 @@
         docid: int, identifying the document
         return: None
 
-        If docid does not exist, KeyError is raised.
+        This call is a no-op if the docid isn't in the index, however,
+        after this call, the index should have no references to the docid.
         """
 
+    def clear():
+        """Unindex all documents indexed by the index
+        """
+
 class IQuerying(Interface):
     """An index that can be queried by some text and returns a result set."""
 
@@ -147,10 +152,10 @@
         """
 
 class ISimpleQuery(Interface):
-    "A simple query interface."
+    """A simple query interface."""
 
     def query(term, start=0, count=None):
-        "search for the given term, return a sequence of hubids"
+        """Search for the given term, return a sequence of docids"""
 
 
 class ITopicFilteredSet(Interface):



More information about the Zope3-Checkins mailing list