[ 
https://issues.apache.org/jira/browse/SOLR-13525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joel Bernstein reassigned SOLR-13525:
-------------------------------------

    Assignee: Joel Bernstein

> There is no convenient way to define a numeric value in the Tuple function
> --------------------------------------------------------------------------
>
>                 Key: SOLR-13525
>                 URL: https://issues.apache.org/jira/browse/SOLR-13525
>             Project: Solr
>          Issue Type: Bug
>          Components: streaming expressions
>    Affects Versions: 7.7.1
>            Reporter: Oleksandr Chornyi
>            Assignee: Joel Bernstein
>            Priority: Minor
>
> h3. Background
> An easy way to experiment with Streaming Expressions is to define a tuple or 
> list of tuples as a stream source and apply decorators\evaluators to this 
> source. However, at the moment there is no easy way to define numeric values 
> in a tuple because everything is being treated as a string.
> h3. Steps to Reproduce
> Evaluate the following streaming expression:
> {code:java}
> tuple(int=13, float=42.42, string=foo, quoted_string="bar")
> {code}
> *Actual Result*:
> {code}
> "docs": [
>   {
>     "int": "13",
>     "float": "42.42",
>     "string": "foo",
>     "quoted_string": "bar"
>   },
>   ...
> ]
> {code}
> *Expected Result*:
> {code}
> "docs": [
>   {
>     "int": 13,
>     "float": 42.42,
>     "string": "foo",
>     "quoted_string": "bar"
>   },
>   ...
> ]
> {code}
> h3. Possible Workarounds
> It's possible to get the desired result by applying {{val()}} function to 
> each numeric value, but it's not convenient:
> {code:java}
> tuple(int=val(13), float=val(42.42))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to