You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Alberto Ferrini (Jira)" <ji...@apache.org> on 2022/01/18 14:32:00 UTC
[jira] [Updated] (SOLR-15933) Curly bracket escape issue in Children Query Parser
[ https://issues.apache.org/jira/browse/SOLR-15933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Ferrini updated SOLR-15933:
-----------------------------------
Description:
During query tests, I discovered a curly bracket escape issue with the Children Query Parser.
I created a new collection with _default config set, then I uploaded these documents:
{{{}}
{{ "id": "parentId001",}}
{{ "name_s": "parentName001",}}
{{ "child001": {}}
{{ "id": "childId001",}}
{{ "name_s": "childName001"}}
{{ }}}
{{},}}
{{{}}
{{ "id": "parentId002",}}
{{ "name_s": "parentName\{002}",}}
{{ "child002": {}}
{{ "id": "childId002",}}
{{ "name_s": "childName002"}}
{{ }}}
{{},}}
The execution of this query
{{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName001") AND name_s:"childName001"}}
is OK, but this one
{{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName\{002}") AND name_s:"childName002"}}
returns an Exception:
{quote}{{Cannot parse '+name_s:"parentName': Lexical error at line 1, column 20. Encountered: <EOF> after : "\"parentName"}}
{quote}
I attached the full stack trace.
was:
During query tests, I discovered a curly bracket escape issue with the Children Query Parser.
I created a new collection with _default config set, then I uploaded these documents:
{quote}{{{}}
{{ "id": "parentId001",}}
{{ "name_s": "parentName001",}}
{{ "child001": {}}
{{ "id": "childId001",}}
{{ "name_s": "childName001"}}
{{ }}}
{{},}}
{{{}}
{{ "id": "parentId002",}}
{{ "name_s": "parentName\{002}",}}
{{ "child002": {}}
{{ "id": "childId002",}}
{{ "name_s": "childName002"}}
{{ }}}
{{}}}{quote}
The execution of this query
{quote}{{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName001") AND name_s:"childName001"}}{quote}
is OK, but this one
{quote}{{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName\{002}") AND name_s:"childName002"}}{quote}
returns an Exception:
{quote}{{Cannot parse '+name_s:"parentName': Lexical error at line 1, column 20. Encountered: <EOF> after : "\"parentName"}}{quote}
I attached the full stack trace.
> Curly bracket escape issue in Children Query Parser
> ---------------------------------------------------
>
> Key: SOLR-15933
> URL: https://issues.apache.org/jira/browse/SOLR-15933
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: query parsers
> Affects Versions: 8.11.1
> Reporter: Alberto Ferrini
> Priority: Minor
> Attachments: fullstacktrace.txt
>
>
> During query tests, I discovered a curly bracket escape issue with the Children Query Parser.
>
> I created a new collection with _default config set, then I uploaded these documents:
> {{{}}
> {{ "id": "parentId001",}}
> {{ "name_s": "parentName001",}}
> {{ "child001": {}}
> {{ "id": "childId001",}}
> {{ "name_s": "childName001"}}
> {{ }}}
> {{},}}
> {{{}}
> {{ "id": "parentId002",}}
> {{ "name_s": "parentName\{002}",}}
> {{ "child002": {}}
> {{ "id": "childId002",}}
> {{ "name_s": "childName002"}}
> {{ }}}
> {{},}}
>
> The execution of this query
> {{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName001") AND name_s:"childName001"}}
> is OK, but this one
> {{(\{!child of="*:* -_nest_path_:*"}+name_s:"parentName\{002}") AND name_s:"childName002"}}
> returns an Exception:
> {quote}{{Cannot parse '+name_s:"parentName': Lexical error at line 1, column 20. Encountered: <EOF> after : "\"parentName"}}
> {quote}
> I attached the full stack trace.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org