lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Claude Antonio <jcanto...@arcetis.com>
Subject Re: Query attached words
Date Tue, 23 Sep 2008 15:17:09 GMT
Thanks Erick, you are right about the various combinations.
Cheers,

Erick Erickson wrote:
> Yes you can query *method. But you have to turn leading wildcards
> (which I don't have right on the tips of my fingers, but know it's been
> an option for some time now).
>
> But your solution doesn't scale well. If you had
> a.b.c.d.e.f.g.h you'd have to store many combinations in order
> to do what you want, quickly becoming really, really ugly.
>
> But you could store the tokens
> a
> .
> b
> .
> c
> .
> e
> .
> f
> .
> g
> .
> h
> by using the appropriate analyzer (or perhaps rolling
> your own). Then you could use either PhraseQuerys
> or SpanQuerys to do what you want....
>
> Best
> Erick
>
> On Mon, Sep 22, 2008 at 5:40 PM, Jean-Claude Antonio
> <jcantonio@arcetis.com>wrote:
>
>   
>> Hello,
>>
>> If I had a file with the following content:
>> ...
>> object.method();
>> ...
>> I would like to be able to query for
>> object
>> method
>> object.method
>>
>> My guess is that I should store not only "object.method", but also "object"
>> and "method" as I cannot query *method.
>> Any other suggestion?
>>
>> Kind regards,
>>
>> JClaude
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>     
>
>   

---------------------------------------------------------------------
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