Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C1B4EFA3 for ; Wed, 30 Jan 2013 10:54:48 +0000 (UTC) Received: (qmail 98957 invoked by uid 500); 30 Jan 2013 10:54:48 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 98905 invoked by uid 500); 30 Jan 2013 10:54:47 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 98885 invoked by uid 99); 30 Jan 2013 10:54:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 10:54:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 10:54:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 86EA02388C5A; Wed, 30 Jan 2013 10:54:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1440344 - /incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py Date: Wed, 30 Jan 2013 10:54:26 -0000 To: bloodhound-commits@incubator.apache.org From: andrej@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130130105426.86EA02388C5A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: andrej Date: Wed Jan 30 10:54:26 2013 New Revision: 1440344 URL: http://svn.apache.org/viewvc?rev=1440344&view=rev Log: fix import bug in whoosh_backend.py Modified: incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py Modified: incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py?rev=1440344&r1=1440343&r2=1440344&view=diff ============================================================================== --- incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py (original) +++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py Wed Jan 30 10:54:26 2013 @@ -28,7 +28,7 @@ from trac.config import Option from trac.util.text import empty from trac.util.datefmt import utc from whoosh.fields import Schema, ID, DATETIME, KEYWORD, TEXT -#from whoosh import index, sorting, query +from whoosh import index import whoosh from whoosh.writing import AsyncWriter from datetime import datetime @@ -150,11 +150,11 @@ class WhooshBackend(Component): def recreate_index(self): self.log.info('Creating Whoosh index in %s' % self.index_dir) self._make_dir_if_not_exists() - return whoosh.index.create_in(self.index_dir, schema=self.SCHEMA) + return index.create_in(self.index_dir, schema=self.SCHEMA) def _open_or_create_index_if_missing(self): - if whoosh.index.exists_in(self.index_dir): - return whoosh.index.open_dir(self.index_dir) + if index.exists_in(self.index_dir): + return index.open_dir(self.index_dir) else: return self.recreate_index()