Commits

coady  committed f4e8985

TermsFilter requires lucene 3.5.

  • Participants
  • Parent commits 48c4784

Comments (0)

Files changed (5)

File docs/client.rst

 client
 ======
 .. automodule:: lupyne.client
-.. note::
-  Caching more client connections than the backend server supports may cause blocking under load.  CherryPy's default `thread pool`_ is 10.
+.. note:: Caching more client connections than the backend server supports may cause blocking under load.  CherryPy's default `thread pool`_ is 10.
 
 Response
 ---------

File docs/engine.rst

 ParallelIndexer
 ^^^^^^^^^^^^^^^
 .. versionadded:: 1.2
-.. note::  This interface is experimental and might change in incompatible ways in the next release.
+  requires lucene >= 3.5
+.. note:: This interface is experimental and might change in incompatible ways in the next release.
 .. autoclass:: ParallelIndexer
   :show-inheritance:
   :members:
 TermsFilter
 ^^^^^^^^^^^^^
 .. versionadded:: 1.2
-.. note::  This interface is experimental and might change in incompatible ways in the next release.
+  requires lucene >= 3.5
 .. autoclass:: TermsFilter
   :show-inheritance:
   :members:

File docs/server.rst

   --real-time           search in real-time without committing
 
 .. automodule:: lupyne.server
-.. note::
-  Lucene doc ids are ephemeral;  only use doc ids across requests for the same index version.
+.. note:: Lucene doc ids are ephemeral;  only use doc ids across requests for the same index version.
 
 tools
 -----------

File lupyne/engine/queries.py

     """
     ops = {'or': 'update', 'and': 'intersection_update', 'andNot': 'difference_update'}
     def __init__(self, field, values=()):
-        assert hasattr(lucene, 'FixedBitSet'), 'requires FixedBitSet introduced in lucene 3.4'
+        assert lucene.VERSION >= '3.5', 'requires FixedBitSet set operations introduced in lucene 3.5'
         lucene.CachingWrapperFilter.__init__(self, lucene.TermsFilter())
         self.field = field
         self.values = set(values)
         """Update allowed values and corresponding cached bitsets.
         
         :param values: additional term values
-        :param op: set operation used to combine terms and docs
+        :param op: set operation used to combine terms and docs: *and*, *or*, *andNot*
         :param cache: optionally cache all term values using FieldCache
         """
         values = tuple(values)

File test/local.py

     
     def testFilters(self):
         "Custom filters."
-        if not hasattr(lucene, 'FixedBitSet'):
+        if lucene.VERSION < '3.5':
             return self.assertRaises(AssertionError, engine.queries.TermsFilter, '')
         indexer = engine.Indexer()
         indexer.set('name', store=True, index=True)