Changeset 48506
- Timestamp:
- 08/23/06 14:31:17 (2 years ago)
- Files:
-
- NXLucene/trunk/CHANGES (modified) (1 diff)
- NXLucene/trunk/src/nxlucene/core.py (modified) (2 diffs)
- NXLucene/trunk/src/nxlucene/directory (deleted)
- NXLucene/trunk/src/nxlucene/indexer.py (modified) (4 diffs)
- NXLucene/trunk/src/nxlucene/reader.py (modified) (3 diffs)
- NXLucene/trunk/src/nxlucene/searcher.py (modified) (3 diffs)
- NXLucene/trunk/test.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
NXLucene/trunk/CHANGES
r48483 r48506 4 4 New features: 5 5 ~~~~~~~~~~~~~ 6 - Use a PythonFileDirectory instead of an FSDirectory to avoid the gcc-3.4.6 2go 7 limit. 6 - 8 7 Bug fixes: 9 8 ~~~~~~~~~~ NXLucene/trunk/src/nxlucene/core.py
r48483 r48506 40 40 import nxlucene.analysis 41 41 42 from nxlucene.directory.PythonDirectory import PythonFileDirectory43 44 42 class LuceneServer(object): 45 43 """Lucene server. … … 62 60 if not os.path.exists(self.store_dir): 63 61 creation = True 64 return Py thonFileDirectory(self.store_dir, creation)62 return PyLucene.FSDirectory.getDirectory(self.store_dir, creation) 65 63 66 64 def getIndexer(self, creation=False, analyzer=None): NXLucene/trunk/src/nxlucene/indexer.py
r48483 r48506 1 1 # Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 2 2 # Author: Julien Anguenot <ja@nuxeo.com> 3 # 3 # 4 4 # This library is free software; you can redistribute it and/or 5 5 # modify it under the terms of the GNU Lesser General Public 6 6 # License as published by the Free Software Foundation; either 7 7 # version 2.1 of the License, or (at your option) any later version. 8 # 8 # 9 9 # This library is distributed in the hope that it will be useful, 10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 12 # Lesser General Public License for more details. 13 # 13 # 14 14 # You should have received a copy of the GNU Lesser General Public 15 15 # License along with this library; if not, write to the Free Software … … 26 26 import zope.interface 27 27 from interfaces import ILuceneIndexer 28 29 from nxlucene.directory.PythonDirectory import PythonFileDirectory30 28 31 29 class LuceneIndexer(object): … … 45 43 analyzer = PyLucene.StandardAnalyzer() 46 44 self._analyzer = analyzer 47 48 self._store = Py thonFileDirectory(store_dir, creation)45 46 self._store = PyLucene.FSDirectory.getDirectory(store_dir, creation) 49 47 self._writer = self.get(creation, analyzer) 50 48 … … 63 61 self._writer = PyLucene.IndexWriter(self._store, self._analyzer, creation) 64 62 return self._writer 65 63 66 64 def __del__(self): 67 self.close() 65 self.close() NXLucene/trunk/src/nxlucene/reader.py
r48483 r48506 1 1 # Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 2 2 # Author: Julien Anguenot <ja@nuxeo.com> 3 # 3 # 4 4 # This library is free software; you can redistribute it and/or 5 5 # modify it under the terms of the GNU Lesser General Public 6 6 # License as published by the Free Software Foundation; either 7 7 # version 2.1 of the License, or (at your option) any later version. 8 # 8 # 9 9 # This library is distributed in the hope that it will be useful, 10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 12 # Lesser General Public License for more details. 13 # 13 # 14 14 # You should have received a copy of the GNU Lesser General Public 15 15 # License along with this library; if not, write to the Free Software … … 27 27 from interfaces import ILuceneReader 28 28 29 from nxlucene.directory.PythonDirectory import PythonFileDirectory30 31 29 class LuceneReader(object): 32 30 """Lucene Reader … … 42 40 shutil.rmtree(store_dir) 43 41 os.makedirs(store_dir) 44 self._store = Py thonFileDirectory(store_dir, creation)42 self._store = PyLucene.FSDirectory.getDirectory(store_dir, creation) 45 43 self._reader = self.get() 46 44 self.close() NXLucene/trunk/src/nxlucene/searcher.py
r48483 r48506 1 1 # Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 2 2 # Author: Julien Anguenot <ja@nuxeo.com> 3 # 3 # 4 4 # This library is free software; you can redistribute it and/or 5 5 # modify it under the terms of the GNU Lesser General Public 6 6 # License as published by the Free Software Foundation; either 7 7 # version 2.1 of the License, or (at your option) any later version. 8 # 8 # 9 9 # This library is distributed in the hope that it will be useful, 10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 12 # Lesser General Public License for more details. 13 # 13 # 14 14 # You should have received a copy of the GNU Lesser General Public 15 15 # License along with this library; if not, write to the Free Software … … 27 27 from interfaces import ILuceneSearcher 28 28 29 from nxlucene.directory.PythonDirectory import PythonFileDirectory30 31 29 class LuceneSearcher(object): 32 30 """Lucene Searcher … … 38 36 39 37 def __init__(self, store_dir): 40 self._store = Py thonFileDirectory(store_dir, False)38 self._store = PyLucene.FSDirectory.getDirectory(store_dir, False) 41 39 try: 42 40 self._searcher = self.get() 43 41 except PyLucene.JavaError: 44 42 # No indexes yet 45 pass43 return None 46 44 self.close() 47 45 NXLucene/trunk/test.py
r48483 r48506 9 9 # 10 10 # This library is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARR LuceneCatalogTestCaseANTY; without even the implied warranty of11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 13 # Lesser General Public License for more details.
