lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Custom "multi term" SpanQuery subclass issue
Date Thu, 15 Sep 2005 10:39:01 GMT
Martin,

Would you care to submit your changes as a patch to Lucene itself?   
Unless there are any objections, I'd be happy to commit them.  If for  
some reason you can't contribute it, then I'll create those methods  
myself - you're right, it won't be difficult, only a few lines of  
code should do it.

     Erik


On Sep 14, 2005, at 7:39 PM, Martin Haye wrote:

> I had to make changes like this to get my own SpanRangeQuery and
> SpanWildcardQuery to work properly in the larger context. Adding  
> the rewrite
> methods wasn't too hard.
>
> --Martin
>
> On 9/14/05, Erik Hatcher <erik@ehatchersolutions.com> wrote:
>
>>
>> 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.
>>
>> 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.
>>
>> What are my options in this regard?
>>
>> 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.
>>
>> Thoughts?
>>
>> Thanks,
>> Erik
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message