Wild-card query behavior

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Wild-card query behavior

Paresh
Hi All,

I am trying wild-card query with query, filter query with and without !join
and finding it difficult to understand the SOLR behavior.

(-) wild-card like 12* in query: field:12* works well
(-) wild-card like 12* in query with {!join to=... from=...}field:12* -->
works well
(-) wild-card like (12*) in query with {!join to=... from=...}field:(12*)
--> doesn't work
(-) wild-card like (12*) in filter query with &fq={!join to=...
from=...}field:12* --> doesn't work
(-) wild-card like (12*) in filter query with &fq={!join to=...
from=...}field:"12*" --> doesn't work
(-) wild-card like (12*) in filter query with &fq={!join to=...
from=...}field:(12*) --> works well

Why wild-card query does not work with {!join}?

Regards,
Paresh



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Wild-card query behavior

Mikhail Khludnev-2
Hello, Paresh.
Please examine debugQuery output, otherwise 'doesn't work' is vague.

On Wed, Oct 9, 2019 at 8:31 AM Paresh <[hidden email]> wrote:

> Hi All,
>
> I am trying wild-card query with query, filter query with and without !join
> and finding it difficult to understand the SOLR behavior.
>
> (-) wild-card like 12* in query: field:12* works well
> (-) wild-card like 12* in query with {!join to=... from=...}field:12* -->
> works well
> (-) wild-card like (12*) in query with {!join to=... from=...}field:(12*)
> --> doesn't work
> (-) wild-card like (12*) in filter query with &fq={!join to=...
> from=...}field:12* --> doesn't work
> (-) wild-card like (12*) in filter query with &fq={!join to=...
> from=...}field:"12*" --> doesn't work
> (-) wild-card like (12*) in filter query with &fq={!join to=...
> from=...}field:(12*) --> works well
>
> Why wild-card query does not work with {!join}?
>
> Regards,
> Paresh
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

Re: Wild-card query behavior

Paresh
E.g. In query, join with wild-card query using parenthesis I get error -

"error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.parser.ParseException"],
    "msg":"org.apache.solr.search.SyntaxError: Cannot parse
'solrField:(12*': Encountered \"<EOF>\" at line 1, column 57.\r\nWas
expecting one of:\r\n    <AND> ...\r\n    <OR> ...\r\n    <NOT> ...\r\n  
\"+\" ...\r\n    \"-\" ...\r\n    <BAREOPER> ...\r\n    \"(\" ...\r\n  
\")\" ...\r\n    \"*\" ...\r\n    \"^\" ...\r\n    <QUOTED> ...\r\n  
<TERM> ...\r\n    <FUZZY_SLOP> ...\r\n    <PREFIXTERM> ...\r\n    <WILDTERM>
...\r\n    <REGEXPTERM> ...\r\n    \"[\" ...\r\n    \"{\" ...\r\n  
<LPARAMS> ...\r\n    \"filter(\" ...\r\n    <NUMBER> ...\r\n    ",
    "code":400}}

When using the same query with parenthesis in filter query (fq), I get the
expected results.




--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Wild-card query behavior

Mikhail Khludnev-2
Well it remind regular awkward parsing issues. Try to experiment with
&fq={!join to=...from=... v='field:12*'} or &fq={!join to=... from=...
v=$qq}&qq=field:12*
No more questions to ask.

On Wed, Oct 9, 2019 at 4:39 PM Paresh <[hidden email]> wrote:

> E.g. In query, join with wild-card query using parenthesis I get error -
>
> "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.parser.ParseException"],
>     "msg":"org.apache.solr.search.SyntaxError: Cannot parse
> 'solrField:(12*': Encountered \"<EOF>\" at line 1, column 57.\r\nWas
> expecting one of:\r\n    <AND> ...\r\n    <OR> ...\r\n    <NOT> ...\r\n
> \"+\" ...\r\n    \"-\" ...\r\n    <BAREOPER> ...\r\n    \"(\" ...\r\n
> \")\" ...\r\n    \"*\" ...\r\n    \"^\" ...\r\n    <QUOTED> ...\r\n
> <TERM> ...\r\n    <FUZZY_SLOP> ...\r\n    <PREFIXTERM> ...\r\n
> <WILDTERM>
> ...\r\n    <REGEXPTERM> ...\r\n    \"[\" ...\r\n    \"{\" ...\r\n
> <LPARAMS> ...\r\n    \"filter(\" ...\r\n    <NUMBER> ...\r\n    ",
>     "code":400}}
>
> When using the same query with parenthesis in filter query (fq), I get the
> expected results.
>
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


--
Sincerely yours
Mikhail Khludnev