Commits

Matt Chaput committed c27b8a5

Changed keyword argument order in QueryParser. Added docstring for Sorter.order().
Added .pypirc to svn:ignore. Bumped revision number.

Comments (0)

Files changed (3)

src/whoosh/__init__.py

 # limitations under the License.
 #===============================================================================
 
-__version__ = (0, 2, 1)
+__version__ = (0, 2, 2)

src/whoosh/qparser.py

     query language similar to Lucene's.
     """
     
-    def __init__(self, default_field,
-                 conjunction = query.And,
-                 termclass = query.Term,
-                 schema = None):
+    def __init__(self, default_field, schema = None,
+                 conjunction = query.And, termclass = query.Term):
         """
         :param default_field: Use this as the field for any terms without
             an explicit field. For example, if the query string is

src/whoosh/scoring.py

     method.
     
     Concrete subclasses must implement the order() method, which
-    takes a sequence of doc numbers and returns it sorted.
+    takes a sequence of doc numbers and returns a sorted sequence.
     """
     
     def order(self, searcher, docnums, reverse = False):
         """Returns a sorted list of document numbers.
+        
+        Takes an unsorted sequence of docnums and returns a sorted list of
+        docnums, based on whatever sorting criteria this class implements.
+        
+        :param searcher: The searcher which produced the results.
+        :param docnums: The unsorted list of document numbers.
+        :param reverse: Whether the "natural" sort order should be reversed.
+        :returns: A sorted list of document numbers.
         """
         raise NotImplementedError
 
         self._cache = self._searcher = None
     
     def order(self, searcher, docnums, reverse = False):
-        """Takes a sequence of docnums (as produced by query.docs()) and
-        returns a list of docnums sorted by the field values.
-        """
         
         self._make_cache(searcher)
         return sorted(docnums,