You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Paresh <kh...@gmail.com> on 2019/10/09 05:24:37 UTC

Wild-card query behavior

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

Re: Wild-card query behavior

Posted by Mikhail Khludnev <mk...@apache.org>.
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 <kh...@gmail.com> 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

Re: Wild-card query behavior

Posted by Paresh <kh...@gmail.com>.
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

Re: Wild-card query behavior

Posted by Mikhail Khludnev <mk...@apache.org>.
Hello, Paresh.
Please examine debugQuery output, otherwise 'doesn't work' is vague.

On Wed, Oct 9, 2019 at 8:31 AM Paresh <kh...@gmail.com> 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