[ 
https://issues.apache.org/jira/browse/LUCENE-6807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066091#comment-17066091
 ] 

Lucene/Solr QA commented on LUCENE-6807:
----------------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
19s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:red}-1{color} | {color:red} compile {color} | {color:red}  0m 
20s{color} | {color:red} queryparser in the patch failed. {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red}  0m 20s{color} 
| {color:red} queryparser in the patch failed. {color} |
| {color:red}-1{color} | {color:red} Release audit (RAT) {color} | {color:red}  
0m 20s{color} | {color:red} queryparser in the patch failed. {color} |
| {color:red}-1{color} | {color:red} Check forbidden APIs {color} | {color:red} 
 0m 20s{color} | {color:red} queryparser in the patch failed. {color} |
| {color:red}-1{color} | {color:red} Validate source patterns {color} | 
{color:red}  0m 20s{color} | {color:red} queryparser in the patch failed. 
{color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red}  0m  5s{color} 
| {color:red} queryparser in the patch failed. {color} |
| {color:black}{color} | {color:black} {color} | {color:black}  0m 55s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | LUCENE-6807 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12756357/LUCENE-6807-option3.patch
 |
| Optional Tests |  compile  javac  unit  ratsources  checkforbiddenapis  
validatesourcepatterns  |
| uname | Linux lucene1-us-west 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 
10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | ant |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-LUCENE-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh
 |
| git revision | master / 674aba6a851 |
| ant | version: Apache Ant(TM) version 1.10.5 compiled on March 28 2019 |
| Default Java | LTS |
| compile | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-compile-lucene_queryparser.txt
 |
| javac | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-compile-lucene_queryparser.txt
 |
| Release audit (RAT) | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-compile-lucene_queryparser.txt
 |
| Check forbidden APIs | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-compile-lucene_queryparser.txt
 |
| Validate source patterns | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-compile-lucene_queryparser.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/artifact/out/patch-unit-lucene_queryparser.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/testReport/ |
| modules | C: lucene lucene/queryparser U: lucene |
| Console output | 
https://builds.apache.org/job/PreCommit-LUCENE-Build/258/console |
| Powered by | Apache Yetus 0.7.0   http://yetus.apache.org |


This message was automatically generated.



> AbstractRangeQueryNode toQueryString not working as intended
> ------------------------------------------------------------
>
>                 Key: LUCENE-6807
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6807
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/queryparser
>    Affects Versions: 5.3
>            Reporter: Peter Barna
>            Priority: Minor
>         Attachments: LUCENE-6807-option1.patch, LUCENE-6807-option1.patch, 
> LUCENE-6807-option2.patch, LUCENE-6807-option3.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> It is my understanding that for a given {{QueryNode}} node, 
> {{parse(node.toQueryString());}} should return a {{QueryNode}} which is 
> functionally identical to the original node.
> That is not the case with AbstractQueryNode:
> if we have a range query on FIELD from "A" to "B" ({{node = parse("FIELD:[A 
> B]")}}), then {{node.toQueryString()}} will return "[FIELD:A FIELD:B]" which, 
> in turn, is parsed as a range query on the default field from "FIELD:A" to 
> "FIELD:B".
> As far as I know, this affects all versions of lucene.
> I believe I have the knowledge to provide the patch, so I will be working on 
> that today.
> As of now, I have thought of two options to implement this fix, both of which 
> involve modifying the {{ValueQueryNode}} interface to include a method which 
> returns {{value}} as a {{CharSequence}}. 
> The first option is to add a new method to the interface which returns 
> (formatted if necessary) the value as a {{CharSequence}} and implement it in 
> all implementing classes ({{FieldQueryNode}} and {{NumericQueryNode}}). Then 
> in {{AbstractQueryNode#toQueryString()}} we will call that method and escape 
> the values using the provided {{EscapeQuerySyntax}}.
> The second option is to make the protected method {{getTermEscaped()}}, which 
> is already present in all implementing classes, public, and add it to the 
> interface.
> While I think that the second option is certainly cleaner, I do not know why 
> this method is protected in the first place, so I will proceed with the first 
> option until someone who is more familiar with the lucene project than I am 
> can comment on the matter.
> As I am writing this, it occurs to me that implementing the first option is 
> essentially just bypassing the protected scope on {{getTermEscapeed()}}, so 
> maybe it is correct to just review whether or not that method needs to be 
> protected. It also occurred to me to use the existing {{getValue()}} method, 
> and format and escape the {{toString()}} of that, but that depends on a 
> generic class having implemented {{toString()}} in a way that plays nicely 
> with the query parser, so, to me, this is below the two previously mentioned 
> options.



--
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

Reply via email to