Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 85240 invoked from network); 28 Apr 2009 05:47:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 05:47:46 -0000 Received: (qmail 53458 invoked by uid 500); 28 Apr 2009 05:47:46 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 53411 invoked by uid 500); 28 Apr 2009 05:47:46 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Received: (qmail 53401 invoked by uid 99); 28 Apr 2009 05:47:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 05:47:46 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [66.51.199.98] (HELO mail10.dslextreme.com) (66.51.199.98) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 28 Apr 2009 05:47:36 +0000 Received: (qmail 19941 invoked from network); 28 Apr 2009 05:47:14 -0000 Received: from unknown (HELO ovaltofu.org) (66.159.224.220) by mail10.dslextreme.com with (DHE-RSA-AES256-SHA encrypted) SMTP; Mon, 27 Apr 2009 22:47:14 -0700 Received: from [192.168.0.6] ([192.168.0.6]) (authenticated bits=0) by ovaltofu.org (8.13.8/8.13.5) with ESMTP id n3S5lZlC006829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Apr 2009 22:47:35 -0700 (PDT) Date: Mon, 27 Apr 2009 22:48:36 -0700 (PDT) From: Andi Vajda X-X-Sender: vajda@yuzu.local Reply-To: Andi Vajda To: pylucene-dev@lucene.apache.org Subject: Re: SpanScorer Not implemented Error In-Reply-To: <3836ec640904272228j3fdea1a6t6ec949857929649e@mail.gmail.com> Message-ID: References: <3836ec640904272228j3fdea1a6t6ec949857929649e@mail.gmail.com> User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 28 Apr 2009, Max Lynch wrote: > I am trying to get a list of all terms that matched a document. So, if I > search for "John Smith", I want to know if I found "John Smith" specifically > in the document. I can use the lucene results but I need to do more > processing based on exactly what was found. I am using a highlighter and > formatter for this, but if I use the QueryScorer it breaks up the phrase > into "John" and "Smith", but only if the whole name was found. I have > uncovered that maybe the SpanScorer would preserve the whole phrase, but > when I try to use it I get NotImplementedError. Has it not been interfaced > yet? Is it a difficult thing to do? If you are trying to use the highlighter package's SpanScorer class, there may be a problem with it clashing (by name) with the org.apache.lucene.search.spans.SpanScorer class: >>> import lucene >>> lucene.initVM(lucene.CLASSPATH) >>> lucene.SpanScorer.class_ But without a specific example of what you're trying to do, it's mostly just guesswork here. If I guessed this right, enhancing JCC so that specific classes involved in a name clash can be renamed in Python (because java packages are flattened out in Python, yet not in the underlying generated C++) shouldn't be too hard. Could you please include a piece of code that reproduces the problem ? Thanks ! Andi..