You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2011/02/17 16:35:25 UTC

[jira] Created: (SOLR-2371) Add a min() function query, upgrade max() function query to take two value sources

Add a min() function query, upgrade max() function query to take two value sources
----------------------------------------------------------------------------------

                 Key: SOLR-2371
                 URL: https://issues.apache.org/jira/browse/SOLR-2371
             Project: Solr
          Issue Type: New Feature
            Reporter: Grant Ingersoll
            Priority: Trivial
             Fix For: 3.2, 4.0


There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

-- 
This message is automatically generated by JIRA.
-
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Grant Ingersoll updated SOLR-2371:
----------------------------------

    Attachment: SOLR-2371.patch

adds min, fixes max

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

-- 
This message is automatically generated by JIRA.
-
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Michael McCandless updated SOLR-2371:
-------------------------------------

    Fix Version/s: 3.2

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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] [Resolved] (SOLR-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Grant Ingersoll resolved SOLR-2371.
-----------------------------------

    Resolution: Fixed

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Bill Bell commented on SOLR-2371:
---------------------------------

Can we add a alpha sort min and max for non-numerical multiValued fields?

The use case is sort by As before Bs in the field.

I do a fq=field:a* then I add sort=min(field) asc

Thanks







> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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] [Reopened] (SOLR-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Michael McCandless reopened SOLR-2371:
--------------------------------------

      Assignee: Michael McCandless

OK thanks Grant.

I'll reopen & backport to 3.x...

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Bill Bell commented on SOLR-2371:
---------------------------------

I cannot get min() and max(0 to work on 3.2 branch.

http://localhost:8983/solr/select?q={!func}min%28geodist%28store%29,geodist%28store1%29%29%20asc&fl=*,score&pt=37.0752,-99.032&d=1&fq=_query_:%22{!geofilt%20sfield=store2}%22%20_query_:%22{!geofilt%20sfield=store}%22%20_query_:%22{!geofilt%20sfield=store1}%22&fq=id:BILL1

Problem accessing /solr/select. Reason:

    org.apache.lucene.queryParser.ParseException: Unknown function min in FunctionQuery('min(geodist(store),geodist(store1)) asc', pos=4)



> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Grant Ingersoll updated SOLR-2371:
----------------------------------

    Fix Version/s:     (was: 3.2)

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Grant Ingersoll commented on SOLR-2371:
---------------------------------------

I would open a new issue.  A patch would be great.  Should be pretty straightforward given the new string support.

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Bill Bell commented on SOLR-2371:
---------------------------------

My svn info:

Path: .
URL: http://svn.apache.org/repos/asf/lucene/dev/branches/branch_3x/solr/src
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1127415
Node Kind: directory
Schedule: normal
Last Changed Author: yonik
Last Changed Rev: 1127305
Last Changed Date: 2011-05-24 15:37:33 -0600 (Tue, 24 May 2011)





> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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] [Resolved] (SOLR-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Michael McCandless resolved SOLR-2371.
--------------------------------------

    Resolution: Fixed

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Michael McCandless commented on SOLR-2371:
------------------------------------------

It looks like this was only committed to trunk... I'm not sure why.

Grant was there a reason why this is not safe to backport to 3.x?  It seems low risk...

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Bill Bell commented on SOLR-2371:
---------------------------------

I applied the patch manually and it worked.

Why is it not applied to branch_3x ? I am getting confused on the branches...

This now works:

{code}
http://localhost:8983/solr/select?sort=min%28min%28geodist%28store%29,geodist%28store1%29%29,geodist%28store2%29%29%20asc&q={!func}min%28min%28geodist%28store%29,geodist%28store1%29%29,geodist%28store2%29%29&fl=*,score&pt=35.0752,-97.032&d=1000&fq=_query_:%22{!geofilt%20sfield=store2}%22%20_query_:%22{!geofilt%20sfield=store}%22%20_query_:%22{!geofilt%20sfield=store1}%22
{code}

Very useful to deal with multiple Spatial per document.


> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Grant Ingersoll commented on SOLR-2371:
---------------------------------------

bq. Grant was there a reason why this is not safe to backport to 3.x?

B/C I forgot too!  We should definitely bring it back.

> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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-2371) Add a min() function query, upgrade max() function query to take two value sources

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

Bill Bell edited comment on SOLR-2371 at 5/20/11 6:02 AM:
----------------------------------------------------------

Can we add a alpha sort min and max for non-numerical multiValued fields?

The use case is sort by As before Bs in the field.

If I have the following in he field:
aa
zzzz

I add sort=min(field) asc

I should get sort by the "aa" field

Thanks







      was (Author: billnbell):
    Can we add a alpha sort min and max for non-numerical multiValued fields?

The use case is sort by As before Bs in the field.

I do a fq=field:a* then I add sort=min(field) asc

Thanks






  
> Add a min() function query, upgrade max() function query to take two value sources
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2371
>                 URL: https://issues.apache.org/jira/browse/SOLR-2371
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2371.patch
>
>
> There doesn't appear to be a min() function.  Also, max() only allows a value source and a constant b/c it is from before we had more flexible parsing.

--
This message is automatically generated by JIRA.
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