lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Klaas <mike.kl...@gmail.com>
Subject Re: More IP/MAC indexing questions
Date Wed, 01 Aug 2007 21:30:55 GMT

On 1-Aug-07, at 11:34 AM, Joe Attardi wrote:

> On 8/1/07, Erick Erickson <erickerickson@gmail.com> wrote:
>>
>> Use a SpanNearQuery with a slop of 0 and specify true for ordering.
>> What that will do is require that the segments you specify must  
>> appear
>> in order with no gaps. You have to construct this yourself since  
>> there's
>> no support for SpanQueries in the QueryParser yet. This'll avoid  
>> having
>> to deal with Wildcards, which have their own issues (try searching on
>> a thread "I just don't understand wildcards at all" for an  
>> exposition from
>> "the guys" on this.
>
>
> Thanks Erick, I'll try this. My only other question here though, is  
> what if
> they specify an incomplete octet of an address? For example, I want '
> 192.168.10' to match 192.168.10.1 and 192.168.100.1. How can I do this
> without wildcards, is there a way to put a PrefixQuery into the  
> Span Query?

If 192 168 10 1 are separate tokens, then a phrase query on "192 168  
10" will find it.  If it is a single token, then a wildcard or regex  
query is necessary.

-Mike

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


Mime
View raw message