[jira] [Comment Edited] (SOLR-14557) eDisMax parser unable to parse {!lucene}(gigabyte)

2020-07-01 Thread Mikhail Khludnev (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149687#comment-17149687
 ] 

Mikhail Khludnev edited comment on SOLR-14557 at 7/1/20, 8:30 PM:
--

Attached pretty straightforward fix for the grammar 

{noformat}
 | )* (~["=","}"])+ ( "=" ( | 
("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {


| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{noformat}

Opinions? 


was (Author: mkhludnev):
Attached pretty straightforward fix for the grammar 

{noformat}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {
|  q=Query(field)  [  boost= ]
| ( { flags=startFilter(); } q=Query(field)  [  
boost= ] { q=getFilter(q); restoreFlags(flags); } )
| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{noformat}

Opinions? 

> eDisMax parser unable to parse {!lucene}(gigabyte)
> --
>
> Key: SOLR-14557
> URL: https://issues.apache.org/jira/browse/SOLR-14557
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: query parsers
>Reporter: Mikhail Khludnev
>Priority: Major
>  Labels: painful
> Attachments: SOLR-14557.patch, SOLR-14557.patch, SOLR-14557.patch
>
>
> h2. Solr 4.5
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
>  
>  goes like
>  {code}
>  \{!lucene}(foo)
>  content:foo
>  LuceneQParser
> {code}
> fine
> h2. Solr 8.2 
> with luceneMatchVersion=4.5 following SOLR-11501 I know it's a grey zone but 
> it's a question of migrating existing queries. 
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
> goes like 
> {code}
> "querystring":"\{!lucene}(foo)",
>  "parsedquery":"+DisjunctionMaxQuery(((Project.Address:lucene 
> Project.Address:foo) | (Project.OwnerType:lucene Project.OwnerType:foo) 
>  "QParser":"ExtendedDismaxQParser",
> {code}
> blah... 
> but removing braces in 8.2 works perfectly fine 
> {code}
> "querystring":"\{!lucene}foo",
>  "parsedquery":"+content:foo",
>  "parsedquery_toString":"+content:foo",
>  "QParser":"ExtendedDismaxQParser",
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-14557) eDisMax parser unable to parse {!lucene}(gigabyte)

2020-07-01 Thread Mikhail Khludnev (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149687#comment-17149687
 ] 

Mikhail Khludnev edited comment on SOLR-14557 at 7/1/20, 8:29 PM:
--

Attached pretty straightforward fix for the grammar 

{noformat}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {
|  q=Query(field)  [  boost= ]
| ( { flags=startFilter(); } q=Query(field)  [  
boost= ] { q=getFilter(q); restoreFlags(flags); } )
| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{noformat}

Opinions? 


was (Author: mkhludnev):
Attached pretty straightforward fix for the grammar 
{quote}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {
|  q=Query(field)  [  boost= ]
| ( { flags=startFilter(); } q=Query(field)  [  
boost= ] { q=getFilter(q); restoreFlags(flags); } )
| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{quote}

Opinions? 

> eDisMax parser unable to parse {!lucene}(gigabyte)
> --
>
> Key: SOLR-14557
> URL: https://issues.apache.org/jira/browse/SOLR-14557
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: query parsers
>Reporter: Mikhail Khludnev
>Priority: Major
>  Labels: painful
> Attachments: SOLR-14557.patch, SOLR-14557.patch, SOLR-14557.patch
>
>
> h2. Solr 4.5
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
>  
>  goes like
>  {code}
>  \{!lucene}(foo)
>  content:foo
>  LuceneQParser
> {code}
> fine
> h2. Solr 8.2 
> with luceneMatchVersion=4.5 following SOLR-11501 I know it's a grey zone but 
> it's a question of migrating existing queries. 
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
> goes like 
> {code}
> "querystring":"\{!lucene}(foo)",
>  "parsedquery":"+DisjunctionMaxQuery(((Project.Address:lucene 
> Project.Address:foo) | (Project.OwnerType:lucene Project.OwnerType:foo) 
>  "QParser":"ExtendedDismaxQParser",
> {code}
> blah... 
> but removing braces in 8.2 works perfectly fine 
> {code}
> "querystring":"\{!lucene}foo",
>  "parsedquery":"+content:foo",
>  "parsedquery_toString":"+content:foo",
>  "QParser":"ExtendedDismaxQParser",
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-14557) eDisMax parser unable to parse {!lucene}(gigabyte)

2020-07-01 Thread Mikhail Khludnev (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149687#comment-17149687
 ] 

Mikhail Khludnev edited comment on SOLR-14557 at 7/1/20, 8:28 PM:
--

Attached pretty straightforward fix for the grammar 
{quote}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {
|  q=Query(field)  [  boost= ]
| ( { flags=startFilter(); } q=Query(field)  [  
boost= ] { q=getFilter(q); restoreFlags(flags); } )
| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{quote}

Opinions? 


was (Author: mkhludnev):
Attached pretty straightforward fix for the grammar 
{code}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])* >
+| )* (~["=","}"])+ ( "=" ( 
| ("'" (<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}" "(")  (~[")"," 
","\t","\n","{","^"])* ")" >
 | 
 }
 
@@ -253,6 +254,7 @@ Query Clause(String field) throws SyntaxError : {
|  q=Query(field)  [  boost= ]
| ( { flags=startFilter(); } q=Query(field)  [  
boost= ] { q=getFilter(q); restoreFlags(flags); } )
| (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
+   | (localParams =  [  boost= ] { 
q=getLocalParams(field, localParams.image); }  )
{code}

Opinions? 

> eDisMax parser unable to parse {!lucene}(gigabyte)
> --
>
> Key: SOLR-14557
> URL: https://issues.apache.org/jira/browse/SOLR-14557
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: query parsers
>Reporter: Mikhail Khludnev
>Priority: Major
>  Labels: painful
> Attachments: SOLR-14557.patch, SOLR-14557.patch, SOLR-14557.patch
>
>
> h2. Solr 4.5
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
>  
>  goes like
>  {code}
>  \{!lucene}(foo)
>  content:foo
>  LuceneQParser
> {code}
> fine
> h2. Solr 8.2 
> with luceneMatchVersion=4.5 following SOLR-11501 I know it's a grey zone but 
> it's a question of migrating existing queries. 
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
> goes like 
> {code}
> "querystring":"\{!lucene}(foo)",
>  "parsedquery":"+DisjunctionMaxQuery(((Project.Address:lucene 
> Project.Address:foo) | (Project.OwnerType:lucene Project.OwnerType:foo) 
>  "QParser":"ExtendedDismaxQParser",
> {code}
> blah... 
> but removing braces in 8.2 works perfectly fine 
> {code}
> "querystring":"\{!lucene}foo",
>  "parsedquery":"+content:foo",
>  "parsedquery_toString":"+content:foo",
>  "QParser":"ExtendedDismaxQParser",
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-14557) eDisMax parser unable to parse {!lucene}(gigabyte)

2020-06-30 Thread Mikhail Khludnev (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148478#comment-17148478
 ] 

Mikhail Khludnev edited comment on SOLR-14557 at 6/30/20, 9:46 AM:
---

Note that local params pattern doesn't include closing parenthesis 
{code}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])*  >
{code}
If I include it like
{code}
 (~[")"," ","\t","\n","{","^"])* ([")"])? >
{code}
It fixes my test {{\{!lucene}(gigabyte)}}, but breaks another parenthesis 
{{(\{!lucene}gigabyte)}}.


was (Author: mkhludnev):
Note that local params pattern doesn't include closing parenthesis 
{code}
| )* (~["=","}"])+ ( "=" ( | ("'" 
(<_SQUOTED_CHAR>)* "'") | (~[" ","}"])+ )? )? )* "}")+  (~[")"," 
","\t","\n","{","^"])*  >
{code}
If I include it like
{code}
 (~[")"," ","\t","\n","{","^"])* ([")"])? >
{code}
It fixes my test {{\{!lucene}(gigabyte)}}, but breaks another parenthesis 
{{(\{!lucne}gigabyte)}}.

> eDisMax parser unable to parse {!lucene}(gigabyte)
> --
>
> Key: SOLR-14557
> URL: https://issues.apache.org/jira/browse/SOLR-14557
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: query parsers
>Reporter: Mikhail Khludnev
>Priority: Major
>  Labels: painful
> Attachments: SOLR-14557.patch, SOLR-14557.patch
>
>
> h2. Solr 4.5
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
>  
>  goes like
>  {code}
>  \{!lucene}(foo)
>  content:foo
>  LuceneQParser
> {code}
> fine
> h2. Solr 8.2 
> with luceneMatchVersion=4.5 following SOLR-11501 I know it's a grey zone but 
> it's a question of migrating existing queries. 
> {{/select?defType=edismax=\{!lucene}(foo)=true}} 
> goes like 
> {code}
> "querystring":"\{!lucene}(foo)",
>  "parsedquery":"+DisjunctionMaxQuery(((Project.Address:lucene 
> Project.Address:foo) | (Project.OwnerType:lucene Project.OwnerType:foo) 
>  "QParser":"ExtendedDismaxQParser",
> {code}
> blah... 
> but removing braces in 8.2 works perfectly fine 
> {code}
> "querystring":"\{!lucene}foo",
>  "parsedquery":"+content:foo",
>  "parsedquery_toString":"+content:foo",
>  "QParser":"ExtendedDismaxQParser",
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org