Changeset 48506

Show
Ignore:
Timestamp:
08/23/06 14:31:17 (2 years ago)
Author:
janguenot
Message:

rollback python directory changes. The ongoing work will be done in a branch for now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • NXLucene/trunk/CHANGES

    r48483 r48506  
    44New features: 
    55~~~~~~~~~~~~~ 
    6 - Use a PythonFileDirectory instead of an FSDirectory to avoid the gcc-3.4.6 2go 
    7   limit. 
     6
    87Bug fixes: 
    98~~~~~~~~~~ 
  • NXLucene/trunk/src/nxlucene/core.py

    r48483 r48506  
    4040import nxlucene.analysis 
    4141 
    42 from nxlucene.directory.PythonDirectory import PythonFileDirectory 
    43  
    4442class LuceneServer(object): 
    4543    """Lucene server. 
     
    6260        if not os.path.exists(self.store_dir): 
    6361            creation = True 
    64         return PythonFileDirectory(self.store_dir, creation) 
     62        return PyLucene.FSDirectory.getDirectory(self.store_dir, creation) 
    6563 
    6664    def getIndexer(self, creation=False, analyzer=None): 
  • NXLucene/trunk/src/nxlucene/indexer.py

    r48483 r48506  
    11# Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 
    22# Author: Julien Anguenot <ja@nuxeo.com> 
    3 # 
     3#  
    44# This library is free software; you can redistribute it and/or 
    55# modify it under the terms of the GNU Lesser General Public 
    66# License as published by the Free Software Foundation; either 
    77# version 2.1 of the License, or (at your option) any later version. 
    8 # 
     8#  
    99# This library is distributed in the hope that it will be useful, 
    1010# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1212# Lesser General Public License for more details. 
    13 # 
     13#  
    1414# You should have received a copy of the GNU Lesser General Public 
    1515# License along with this library; if not, write to the Free Software 
     
    2626import zope.interface 
    2727from interfaces import ILuceneIndexer 
    28  
    29 from nxlucene.directory.PythonDirectory import PythonFileDirectory 
    3028 
    3129class LuceneIndexer(object): 
     
    4543            analyzer = PyLucene.StandardAnalyzer() 
    4644        self._analyzer = analyzer 
    47  
    48         self._store = PythonFileDirectory(store_dir, creation) 
     45     
     46        self._store = PyLucene.FSDirectory.getDirectory(store_dir, creation) 
    4947        self._writer = self.get(creation, analyzer) 
    5048 
     
    6361            self._writer = PyLucene.IndexWriter(self._store, self._analyzer, creation) 
    6462        return self._writer 
    65  
     63     
    6664    def __del__(self): 
    67         self.close() 
     65        self.close()     
  • NXLucene/trunk/src/nxlucene/reader.py

    r48483 r48506  
    11# Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 
    22# Author: Julien Anguenot <ja@nuxeo.com> 
    3 # 
     3#  
    44# This library is free software; you can redistribute it and/or 
    55# modify it under the terms of the GNU Lesser General Public 
    66# License as published by the Free Software Foundation; either 
    77# version 2.1 of the License, or (at your option) any later version. 
    8 # 
     8#  
    99# This library is distributed in the hope that it will be useful, 
    1010# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1212# Lesser General Public License for more details. 
    13 # 
     13#  
    1414# You should have received a copy of the GNU Lesser General Public 
    1515# License along with this library; if not, write to the Free Software 
     
    2727from interfaces import ILuceneReader 
    2828 
    29 from nxlucene.directory.PythonDirectory import PythonFileDirectory 
    30  
    3129class LuceneReader(object): 
    3230    """Lucene Reader 
     
    4240                shutil.rmtree(store_dir) 
    4341            os.makedirs(store_dir) 
    44         self._store = PythonFileDirectory(store_dir, creation) 
     42        self._store = PyLucene.FSDirectory.getDirectory(store_dir, creation) 
    4543        self._reader = self.get() 
    4644        self.close() 
  • NXLucene/trunk/src/nxlucene/searcher.py

    r48483 r48506  
    11# Copyright (C) 2006, Nuxeo SAS <http://www.nuxeo.com> 
    22# Author: Julien Anguenot <ja@nuxeo.com> 
    3 # 
     3#  
    44# This library is free software; you can redistribute it and/or 
    55# modify it under the terms of the GNU Lesser General Public 
    66# License as published by the Free Software Foundation; either 
    77# version 2.1 of the License, or (at your option) any later version. 
    8 # 
     8#  
    99# This library is distributed in the hope that it will be useful, 
    1010# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1212# Lesser General Public License for more details. 
    13 # 
     13#  
    1414# You should have received a copy of the GNU Lesser General Public 
    1515# License along with this library; if not, write to the Free Software 
     
    2727from interfaces import ILuceneSearcher 
    2828 
    29 from nxlucene.directory.PythonDirectory import PythonFileDirectory 
    30  
    3129class LuceneSearcher(object): 
    3230    """Lucene Searcher 
     
    3836 
    3937    def __init__(self, store_dir): 
    40         self._store = PythonFileDirectory(store_dir, False) 
     38        self._store = PyLucene.FSDirectory.getDirectory(store_dir, False) 
    4139        try: 
    4240            self._searcher = self.get() 
    4341        except PyLucene.JavaError: 
    4442            # No indexes yet 
    45             pass 
     43            return None 
    4644        self.close() 
    4745 
  • NXLucene/trunk/test.py

    r48483 r48506  
    99# 
    1010# This library is distributed in the hope that it will be useful, 
    11 # but WITHOUT ANY WARRLuceneCatalogTestCaseANTY; without even the implied warranty of 
     11# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1313# Lesser General Public License for more details.