Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 3574 invoked from network); 15 Sep 2005 03:34:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2005 03:34:56 -0000 Received: (qmail 17499 invoked by uid 500); 15 Sep 2005 03:34:54 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 17486 invoked by uid 500); 15 Sep 2005 03:34:54 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Delivered-To: moderator for java-dev@lucene.apache.org Received: (qmail 35369 invoked by uid 99); 14 Sep 2005 23:39:43 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_30_40,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of martin.haye@gmail.com designates 66.249.82.207 as permitted sender) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:references; b=pxpXkzzXPM6SFIb+dNUKuUo2hDNy9JfouXNlF4NjzbyggIVD5kUWILZWt7Tfh3uY4rYStOFjiG+GHbaqNDbnZQLM/LMbPdwVG0+/vFYJDUOYv50lH4SjpdBnVwLdNcmF18vZpaE2o+hl9VLoqZKKgohSQiDGQ4HMwGlWEx5dLOc= Message-ID: <2d5af94905091416391bbc9fa6@mail.gmail.com> Date: Wed, 14 Sep 2005 16:39:41 -0700 From: Martin Haye Reply-To: Martin Haye Sender: martin.haye@gmail.com To: java-dev@lucene.apache.org Subject: Re: Custom "multi term" SpanQuery subclass issue In-Reply-To: <9F45D8AE-B270-4C98-841A-9E0AF6204551@ehatchersolutions.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1659_13044810.1126741181303" References: <9F45D8AE-B270-4C98-841A-9E0AF6204551@ehatchersolutions.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_1659_13044810.1126741181303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I had to make changes like this to get my own SpanRangeQuery and=20 SpanWildcardQuery to work properly in the larger context. Adding the rewrit= e=20 methods wasn't too hard. --Martin On 9/14/05, Erik Hatcher wrote: >=20 > I'm implementing a custom SpanQuery subclass that expands into > multiple terms (sort of like WildcardQuery). I've subclassed > SpanQuery and overridden the rewrite method to rewrite itself into a > SpanOrQuery. This works fine by itself as a standalone query. >=20 > However, when my custom SpanQuery subclass is nested within a > SpanNearQuery it is not rewritten (as SpanQuery and all the built-in > subclasses) defer to Query.rewrite. >=20 > What are my options in this regard? >=20 > Should the Span*Query's that aggregate other SpanQuery's > (SpanOrQuery, SpanNearQuery) do something like BooleanQuery.rewrite > ()? It seems like it should just to be on the safe side and allow > rewriting SpanQuery's. >=20 > Thoughts? >=20 > Thanks, > Erik >=20 >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org >=20 > ------=_Part_1659_13044810.1126741181303--