lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <>
Subject [jira] Created: (SOLR-2136) Function Queries: if() function
Date Tue, 28 Sep 2010 21:44:35 GMT
Function Queries: if() function

                 Key: SOLR-2136
             Project: Solr
          Issue Type: New Feature
          Components: search
    Affects Versions: 1.4.1
            Reporter: Jan Høydahl

Add an if() function which will enable conditional function queries.

The function could be modeled after a spreadsheet if function (e.g:

IF(test; value1; value2) where:
    test is or refers to a logical value or expression that returns a logical value (TRUE
or FALSE).
    value1 is the value that is returned by the function if test yields TRUE.
    value2 is the value that is returned by the function if test yields FALSE.

If value2 is omitted it is assumed to be FALSE; if value1 is also omitted it is assumed to
be TRUE.

Example use:
if(color=="red"; 100; if(color=="green"; 50; 25))
This function will check the document field "color", and if it is "red" return 100, if it
is "green" return 50, else return 25.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message