Mailing List Archive

partial match
Hi,-
from http://lucene.apache.org/core/3_1_0/queryparsersyntax.html#Fuzzy%20Searches
i would like to search *test~* where i want to find test or text anywhere in the indexed field.
is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
But will ~ work in this scenario?
Best regards
baris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: partial match [ In reply to ]
*test~* will also find tesk too and many more combinations, which is ok.
but is this possible with Lucene?
Best regards

----- Original Message -----
From: baris.kazar@oracle.com
To: java-user@lucene.apache.org
Cc: baris.kazar@oracle.com
Sent: Saturday, August 3, 2019 11:57:37 AM GMT -05:00 US/Canada Eastern
Subject: partial match

Hi,-
from http://lucene.apache.org/core/3_1_0/queryparsersyntax.html#Fuzzy%20Searches
i would like to search *test~* where i want to find test or text anywhere in the indexed field.
is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
But will ~ work in this scenario?
Best regards
baris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: partial match [ In reply to ]
or should i do this
*est* // omit first char and search
*t*st* // omit second char and search-> can we use 3 *s in search?
*te*t* // omit third char and search-> can we use 3 *s in search?
*tes* // omit last char and search

Best regards

----- Original Message -----
From: baris.kazar@oracle.com
To: java-user@lucene.apache.org
Cc: baris.kazar@oracle.com
Sent: Saturday, August 3, 2019 12:00:48 PM GMT -05:00 US/Canada Eastern
Subject: Re: partial match

*test~* will also find tesk too and many more combinations, which is ok.
but is this possible with Lucene?
Best regards

----- Original Message -----
From: baris.kazar@oracle.com
To: java-user@lucene.apache.org
Cc: baris.kazar@oracle.com
Sent: Saturday, August 3, 2019 11:57:37 AM GMT -05:00 US/Canada Eastern
Subject: partial match

Hi,-
from http://lucene.apache.org/core/3_1_0/queryparsersyntax.html#Fuzzy%20Searches
i would like to search *test~* where i want to find test or text anywhere in the indexed field.
is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
But will ~ work in this scenario?
Best regards
baris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: partial match [ In reply to ]
It is not very clear as to what is it that you are trying to achieve
here. If you want to match similar terms as the one you specify in the
query (test, tesk, lest etc), then a fuzzy query (~) should suffice.
Note that you cannot specify a mandatory part of the text that has to
match in every result returned by the query e.g. there is no way to
specify that any hit returned by the query should match "te", and you
are fine with different values for the remaining positions of the
term.

If you want to search for mutations on specific locations, use
wildcard queries. To answer your original question, you cannot use a
wildcard character as the first character of a query.

On Sat, Aug 3, 2019 at 9:27 PM Baris Kazar <baris.kazar@oracle.com> wrote:
>
> Hi,-
> from http://lucene.apache.org/core/3_1_0/queryparsersyntax.html#Fuzzy%20Searches
> i would like to search *test~* where i want to find test or text anywhere in the indexed field.
> is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
> But will ~ work in this scenario?
> Best regards
> baris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


--
Regards,

Atri
Apache Concerted

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: partial match [ In reply to ]
thanks, i found a setting in lucene that is supposed to allow
wildcard as first char, i will post here what it was.
But i have not tested it yet.
Best

----- Original Message -----
From: atri@apache.org
To: java-user@lucene.apache.org
Sent: Sunday, August 4, 2019 11:41:55 PM GMT -05:00 US/Canada Eastern
Subject: Re: partial match

It is not very clear as to what is it that you are trying to achieve
here. If you want to match similar terms as the one you specify in the
query (test, tesk, lest etc), then a fuzzy query (~) should suffice.
Note that you cannot specify a mandatory part of the text that has to
match in every result returned by the query e.g. there is no way to
specify that any hit returned by the query should match "te", and you
are fine with different values for the remaining positions of the
term.

If you want to search for mutations on specific locations, use
wildcard queries. To answer your original question, you cannot use a
wildcard character as the first character of a query.

On Sat, Aug 3, 2019 at 9:27 PM Baris Kazar <baris.kazar@oracle.com> wrote:
>
> Hi,-
> from https://urldefense.proofpoint.com/v2/url?u=http-3A__lucene.apache.org_core_3-5F1-5F0_queryparsersyntax.html-23Fuzzy-2520Searches&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=orQl2vNpXz4HN-5v11WwfVK1hMbj5tcdms4COUlZW54&s=nWxYOJsFm6XFXGNSXCUkwXohc5sDrdRu54Z8ROIN7Uo&e=
> i would like to search *test~* where i want to find test or text anywhere in the indexed field.
> is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
> But will ~ work in this scenario?
> Best regards
> baris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


--
Regards,

Atri
Apache Concerted

---------------------------------------------------------------------
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
Re: partial match [ In reply to ]
Yes, that will allow specifying wildcard as the first character, but
it can lead to very slow queries, especially on larger indices.

On Mon, Aug 5, 2019 at 6:08 PM <baris.kazar@oracle.com> wrote:
>
> Does QueryParser.setAllowLeadingWildCard(true) work?
>
> this will allow to use wildcard as first char in the search string, right?
> Best
>
> On 8/5/19 7:40 AM, Baris Kazar wrote:
> > thanks, i found a setting in lucene that is supposed to allow
> > wildcard as first char, i will post here what it was.
> > But i have not tested it yet.
> > Best
> >
> > ----- Original Message -----
> > From: atri@apache.org
> > To: java-user@lucene.apache.org
> > Sent: Sunday, August 4, 2019 11:41:55 PM GMT -05:00 US/Canada Eastern
> > Subject: Re: partial match
> >
> > It is not very clear as to what is it that you are trying to achieve
> > here. If you want to match similar terms as the one you specify in the
> > query (test, tesk, lest etc), then a fuzzy query (~) should suffice.
> > Note that you cannot specify a mandatory part of the text that has to
> > match in every result returned by the query e.g. there is no way to
> > specify that any hit returned by the query should match "te", and you
> > are fine with different values for the remaining positions of the
> > term.
> >
> > If you want to search for mutations on specific locations, use
> > wildcard queries. To answer your original question, you cannot use a
> > wildcard character as the first character of a query.
> >
> > On Sat, Aug 3, 2019 at 9:27 PM Baris Kazar <baris.kazar@oracle.com> wrote:
> >> Hi,-
> >> from https://urldefense.proofpoint.com/v2/url?u=http-3A__lucene.apache.org_core_3-5F1-5F0_queryparsersyntax.html-23Fuzzy-2520Searches&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=orQl2vNpXz4HN-5v11WwfVK1hMbj5tcdms4COUlZW54&s=nWxYOJsFm6XFXGNSXCUkwXohc5sDrdRu54Z8ROIN7Uo&e=
> >> i would like to search *test~* where i want to find test or text anywhere in the indexed field.
> >> is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
> >> But will ~ work in this scenario?
> >> Best regards
> >> baris
> >>
> >> ---------------------------------------------------------------------
> >> 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
>


--
Regards,

Atri
Apache Concerted

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: partial match [ In reply to ]
Does QueryParser.setAllowLeadingWildCard(true) work?

this will allow to use wildcard as first char in the search string, right?
Best

On 8/5/19 7:40 AM, Baris Kazar wrote:
> thanks, i found a setting in lucene that is supposed to allow
> wildcard as first char, i will post here what it was.
> But i have not tested it yet.
> Best
>
> ----- Original Message -----
> From: atri@apache.org
> To: java-user@lucene.apache.org
> Sent: Sunday, August 4, 2019 11:41:55 PM GMT -05:00 US/Canada Eastern
> Subject: Re: partial match
>
> It is not very clear as to what is it that you are trying to achieve
> here. If you want to match similar terms as the one you specify in the
> query (test, tesk, lest etc), then a fuzzy query (~) should suffice.
> Note that you cannot specify a mandatory part of the text that has to
> match in every result returned by the query e.g. there is no way to
> specify that any hit returned by the query should match "te", and you
> are fine with different values for the remaining positions of the
> term.
>
> If you want to search for mutations on specific locations, use
> wildcard queries. To answer your original question, you cannot use a
> wildcard character as the first character of a query.
>
> On Sat, Aug 3, 2019 at 9:27 PM Baris Kazar <baris.kazar@oracle.com> wrote:
>> Hi,-
>> from https://urldefense.proofpoint.com/v2/url?u=http-3A__lucene.apache.org_core_3-5F1-5F0_queryparsersyntax.html-23Fuzzy-2520Searches&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=orQl2vNpXz4HN-5v11WwfVK1hMbj5tcdms4COUlZW54&s=nWxYOJsFm6XFXGNSXCUkwXohc5sDrdRu54Z8ROIN7Uo&e=
>> i would like to search *test~* where i want to find test or text anywhere in the indexed field.
>> is this possible? i think by setting parser *test* is possible where we can use a * or ? symbol as the first character of a search.
>> But will ~ work in this scenario?
>> Best regards
>> baris
>>
>> ---------------------------------------------------------------------
>> 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