You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Lance Norskog (JIRA)" <ji...@apache.org> on 2012/05/10 23:50:49 UTC

[jira] [Created] (SOLR-3448) Date math in range queries does not handle plus sign

Lance Norskog created SOLR-3448:
-----------------------------------

             Summary: Date math in range queries does not handle plus sign
                 Key: SOLR-3448
                 URL: https://issues.apache.org/jira/browse/SOLR-3448
             Project: Solr
          Issue Type: Bug
          Components: query parsers
            Reporter: Lance Norskog


This query:
{code}
facet.query=[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
{code}

gives this error:
{code}
    Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
Was expecting one of:
    "]" ...
    "}" ...
{code}
Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lance Norskog updated SOLR-3448:
--------------------------------

    Description: 
This query:
{code}
facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
{code}

gives this error:
{code}
    Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
Was expecting one of:
    "]" ...
    "}" ...
{code}
Should the fix be to add a backslash in front of +1DAY? That does not work.

  was:
This query:
{code}
facet.query=[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
{code}

gives this error:
{code}
    Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
Was expecting one of:
    "]" ...
    "}" ...
{code}
Should the fix be to add a backslash in front of +1DAY? That does not work.

    
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273116#comment-13273116 ] 

Lance Norskog commented on SOLR-3448:
-------------------------------------

Oy. It was even worse: the field was not a date field. My Solr was magic so it made the field anyway instead of complaining to me.
                
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Issue Comment Edited] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272826#comment-13272826 ] 

Lance Norskog edited comment on SOLR-3448 at 5/10/12 10:06 PM:
---------------------------------------------------------------

Have not tested this in 3.6. Trunk source code is:

{code}
Subversion repository http://svn.apache.org/repos/asf/lucene/dev/trunk
SVN revision 1296914
Git repository git@github.com:lucidimagination/lucene-solr.git
Git commit 7c88528848aefe02e87fdce35203c2550a1b2cd8
{code}
                
      was (Author: lancenorskog):
    Have not tested this in 3.6.
                  
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lance Norskog updated SOLR-3448:
--------------------------------

    Affects Version/s: 4.0
    
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272826#comment-13272826 ] 

Lance Norskog commented on SOLR-3448:
-------------------------------------

Have not tested this in 3.6.
                
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Closed] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lance Norskog closed SOLR-3448.
-------------------------------

    Resolution: Invalid
    
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272803#comment-13272803 ] 

Lance Norskog commented on SOLR-3448:
-------------------------------------

(A side note: this is a problem in both query parsers and maybe faceting. There is no 'facet' component in the JIRA component list.)
                
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3448) Date math in range queries does not handle plus sign

Posted by "Jan Høydahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272856#comment-13272856 ] 

Jan Høydahl commented on SOLR-3448:
-----------------------------------

You're getting bit by URL encoding. Try %2B instead of + :-)

{noformat}
facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY%2B1DAY]
{noformat}

                
> Date math in range queries does not handle plus sign
> ----------------------------------------------------
>
>                 Key: SOLR-3448
>                 URL: https://issues.apache.org/jira/browse/SOLR-3448
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>
> This query:
> {code}
> facet.query=timestamp:[NOW-1YEAR/DAY%20TO%20NOW/DAY+1DAY]
> {code}
> gives this error:
> {code}
>     Cannot parse '[NOW-1YEAR/DAY TO NOW/DAY 1DAY]': Encountered " <RANGE_GOOP> "1DAY "" at line 1, column 26.
> Was expecting one of:
>     "]" ...
>     "}" ...
> {code}
> Should the fix be to add a backslash in front of +1DAY? That does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org