[
https://issues.apache.org/jira/browse/SOLR-5388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Kudryavtsev updated SOLR-5388:
-------------------------------------
Description:
Ability for expressions like _def(min(field1,..,fieldN), defValue)_ return
_defValue_ if document doesn't have value for any of this fields.
Implement _exists(int doc)_ method for FunctionValues created in
MultiFloatFunction. Extract method to get ability other MultiFloatFunction
implementation to override it.
Example:
Doc1: Field1: "10", Field2: "20"
Doc2: Field3: "30", FIeld4: "40"
We want to call user function "def(min(Field1,Field2),5)" for this documents :
Now we've got: Doc1 = 10, Doc2 = Float.POSITIVE_INFINITY
With this patch: Doc1 = 10, Doc2 = 5 ( Doc2 doesn't have values for this
documents, so he gets defValue)
was:
Ability for expressions like _def(min(field1,..,fieldN), defValue)_ return
_defValue_ if document doesn't have value for any of this fields.
Implement _exists(int doc)_ method for FunctionValues created in
MultiFloatFunction. Extract method to get ability other MultiFloatFunction
implementation to override it.
Example:
Doc1: Field1: "10", Field2: "20"
Doc2: Field3: "30", FIeld4: "40"
We want to call user function "def(min(Field1,Field2),5)" for this documents :
Now we've got: Doc1 = 1, Doc2 = Float.POSITIVE_INFINITY
With this patch: Doc1 = 10, Doc2 = 5 ( Doc2 doesn't have values for this
documents, so he gets defValue)
> Combine def function with "multi" functions (max, min, sum, product)
> --------------------------------------------------------------------
>
> Key: SOLR-5388
> URL: https://issues.apache.org/jira/browse/SOLR-5388
> Project: Solr
> Issue Type: New Feature
> Reporter: Andrey Kudryavtsev
> Priority: Minor
> Labels: patch
> Fix For: 5.0
>
> Attachments: SOLR-5388.patch, SOLR-5388.patch
>
>
> Ability for expressions like _def(min(field1,..,fieldN), defValue)_ return
> _defValue_ if document doesn't have value for any of this fields.
> Implement _exists(int doc)_ method for FunctionValues created in
> MultiFloatFunction. Extract method to get ability other MultiFloatFunction
> implementation to override it.
> Example:
> Doc1: Field1: "10", Field2: "20"
> Doc2: Field3: "30", FIeld4: "40"
> We want to call user function "def(min(Field1,Field2),5)" for this documents :
> Now we've got: Doc1 = 10, Doc2 = Float.POSITIVE_INFINITY
> With this patch: Doc1 = 10, Doc2 = 5 ( Doc2 doesn't have values for this
> documents, so he gets defValue)
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]