Matt Chaput avatar Matt Chaput committed 92ae955

Updated docstrings for Searcher.documents() and Searcher.document_numbers().

Comments (0)

Files changed (1)

src/whoosh/searching.py

 
     def documents(self, **kw):
         """Convenience method returns the stored fields of a document
-        matching the given keyword arguments, where the keyword keys are
-        field names and the values are terms that must appear in the field.
+        matching the given keyword arguments, where the keyword keys are field
+        names and the values are terms that must appear in the field.
         
-        Returns a generator of dictionaries containing the
-        stored fields of any documents matching the keyword arguments.
+        Returns a generator of dictionaries containing the stored fields of any
+        documents matching the keyword arguments. If you do not specify any
+        arguments (``Searcher.documents()``), this method will yield **all**
+        documents.
         
         >>> for stored_fields in searcher.documents(emailto=u"matt@whoosh.ca"):
         ...   print "Email subject:", stored_fields['subject']
     def document_numbers(self, **kw):
         """Returns a generator of the document numbers for documents matching
         the given keyword arguments, where the keyword keys are field names and
-        the values are terms that must appear in the field.
+        the values are terms that must appear in the field. If you do not
+        specify any arguments (``Searcher.document_numbers()``), this method
+        will yield **all** document numbers.
         
         >>> docnums = list(searcher.document_numbers(emailto="matt@whoosh.ca"))
         """
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.