lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atri Sharma <a...@apache.org>
Subject Re: partial match
Date Mon, 05 Aug 2019 03:41:05 GMT
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


Mime
View raw message