You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Bon <bo...@unipattern.com> on 2009/04/01 05:32:35 UTC

What is the right query syntax for matching some field's substring?

Hi all,

    I've a question about the query syntax statement,
    There is a lucene text field and the value of the field like
,11,12,15,16,
    if I want to query some data and the value of the field has included
some number what I like(11 or 15),
    how can I do?
    I try to give a query like (filed_name:,11,) but it can not get the
matching.

    or I must reformat the field value with some other symbol not the symbol
comma ','

Bon
-- 
View this message in context: http://www.nabble.com/What-is-the-right-query-syntax-for-matching-some-field%27s-substring--tp22819197p22819197.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: What is the right query syntax for matching some field's substring?

Posted by Bon <bo...@unipattern.com>.
Hi Matt,

    Thanks for your answer,
    I'm new to lucene, so I don't know what should I know about that.
    I find a reference about discuss searching substring and it work good
for me,
    I'm not sure what analyer we used, I'll check it out and make sure why
it work for us.

    thank you very much =)

Best Regards,
Bon


Matthew Hall-7 wrote:
> 
> Which analyzer are you using here?  Depending on your choice the comma 
> separated values might be being kept together in your index, rather than 
> tokenized as you expected.
> 
> Secondly, you should get Luke, and take a look into your index, this 
> should give you a much better idea of what's going on in your index.
> 
> Anyhow, closely examine your analyzer choice, and then your query type 
> choice and see if that's where the problem lies.
> 
> Matt
> 
> Bon wrote:
>> Hi all,
>>
>>     I've a question about the query syntax statement,
>>     There is a lucene text field and the value of the field like
>> ,11,12,15,16,
>>     if I want to query some data and the value of the field has included
>> some number what I like(11 or 15),
>>     how can I do?
>>     I try to give a query like (filed_name:,11,) but it can not get the
>> matching.
>>
>>     or I must reformat the field value with some other symbol not the
>> symbol
>> comma ','
>>
>> Bon
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/What-is-the-right-query-syntax-for-matching-some-field%27s-substring--tp22819197p22837126.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: What is the right query syntax for matching some field's substring?

Posted by Seid Mohammed <se...@gmail.com>.
hi bonn,
can you give me the link you did read for substring matching

Thanks a lot

On 4/2/09, Bon <bo...@unipattern.com> wrote:
>
> Hi Matt,
>
>     Thanks for your answer,
>     I'm new to lucene, so I don't know what should I know about that.
>     I find a reference about discuss searching substring and it work good
> for me,
>     I'm not sure what analyer we used, I'll check it out and make sure why
> it work for us.
>
>     thank you very much =)
>
> Best Regards,
> Bon
>
>
> Matthew Hall-7 wrote:
>>
>> Which analyzer are you using here?  Depending on your choice the comma
>> separated values might be being kept together in your index, rather than
>> tokenized as you expected.
>>
>> Secondly, you should get Luke, and take a look into your index, this
>> should give you a much better idea of what's going on in your index.
>>
>> Anyhow, closely examine your analyzer choice, and then your query type
>> choice and see if that's where the problem lies.
>>
>> Matt
>>
>> Bon wrote:
>>> Hi all,
>>>
>>>     I've a question about the query syntax statement,
>>>     There is a lucene text field and the value of the field like
>>> ,11,12,15,16,
>>>     if I want to query some data and the value of the field has included
>>> some number what I like(11 or 15),
>>>     how can I do?
>>>     I try to give a query like (filed_name:,11,) but it can not get the
>>> matching.
>>>
>>>     or I must reformat the field value with some other symbol not the
>>> symbol
>>> comma ','
>>>
>>> Bon
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/What-is-the-right-query-syntax-for-matching-some-field%27s-substring--tp22819197p22837185.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
"RABI ZIDNI ILMA"

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


Re: What is the right query syntax for matching some field's substring?

Posted by Bon <bo...@unipattern.com>.
Hi Matt,

    Thanks for your answer,
    I'm new to lucene, so I don't know what should I know about that.
    I find a reference about discuss searching substring and it work good
for me,
    I'm not sure what analyer we used, I'll check it out and make sure why
it work for us.

    thank you very much =)

Best Regards,
Bon


Matthew Hall-7 wrote:
> 
> Which analyzer are you using here?  Depending on your choice the comma 
> separated values might be being kept together in your index, rather than 
> tokenized as you expected.
> 
> Secondly, you should get Luke, and take a look into your index, this 
> should give you a much better idea of what's going on in your index.
> 
> Anyhow, closely examine your analyzer choice, and then your query type 
> choice and see if that's where the problem lies.
> 
> Matt
> 
> Bon wrote:
>> Hi all,
>>
>>     I've a question about the query syntax statement,
>>     There is a lucene text field and the value of the field like
>> ,11,12,15,16,
>>     if I want to query some data and the value of the field has included
>> some number what I like(11 or 15),
>>     how can I do?
>>     I try to give a query like (filed_name:,11,) but it can not get the
>> matching.
>>
>>     or I must reformat the field value with some other symbol not the
>> symbol
>> comma ','
>>
>> Bon
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/What-is-the-right-query-syntax-for-matching-some-field%27s-substring--tp22819197p22837185.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: What is the right query syntax for matching some field's substring?

Posted by Matthew Hall <mh...@informatics.jax.org>.
Which analyzer are you using here?  Depending on your choice the comma 
separated values might be being kept together in your index, rather than 
tokenized as you expected.

Secondly, you should get Luke, and take a look into your index, this 
should give you a much better idea of what's going on in your index.

Anyhow, closely examine your analyzer choice, and then your query type 
choice and see if that's where the problem lies.

Matt

Bon wrote:
> Hi all,
>
>     I've a question about the query syntax statement,
>     There is a lucene text field and the value of the field like
> ,11,12,15,16,
>     if I want to query some data and the value of the field has included
> some number what I like(11 or 15),
>     how can I do?
>     I try to give a query like (filed_name:,11,) but it can not get the
> matching.
>
>     or I must reformat the field value with some other symbol not the symbol
> comma ','
>
> Bon
>   


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