You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (JIRA)" <ji...@apache.org> on 2018/10/05 09:16:00 UTC

[jira] [Commented] (SOLR-12749) timeseries() expression missing sum() results for empty buckets

    [ https://issues.apache.org/jira/browse/SOLR-12749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639520#comment-16639520 ] 

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

Joel, you committed this to branch_7x on sept 7th, and the {{branch_7_5}} was cut on sept 10th. Does that mean it is included in 7.5.0? Please update CHANGES and fix version to reflect this and then resolve the issue.

> timeseries() expression missing sum() results for empty buckets
> ---------------------------------------------------------------
>
>                 Key: SOLR-12749
>                 URL: https://issues.apache.org/jira/browse/SOLR-12749
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: streaming expressions
>    Affects Versions: 7.4
>            Reporter: Jan Høydahl
>            Assignee: Joel Bernstein
>            Priority: Major
>             Fix For: 7.6, master (8.0)
>
>         Attachments: SOLR-12749.patch
>
>
> See solr-user post [https://lists.apache.org/thread.html/aeacef8fd8cee980bb74f2f6b7e1c3fd0b7ead7d7a0e7b79dd48659f@%3Csolr-user.lucene.apache.org%3E]
>  
> We have a timeseries expression with gap="+1DAY" and a sum(imps_l) to aggregate sums of an integer for each bucket. Now, some day buckets do not contain any documents at all, and instead of returning a tuple with value 0, it returns a tuple with no entry at all for the sum, see the bucket for date_dt 2018-06-22 below:
> {code:javascript}
> {
>  "result-set": {
>    "docs": [
>      {
>        "sum(imps_l)": 0,
>        "date_dt": "2018-06-21",
>        "count(*)": 5
>      },
>      {
>        "date_dt": "2018-06-22",
>        "count(*)": 0
>      },
>      {
>        "EOF": true,
>        "RESPONSE_TIME": 3
>      }
>    ]
>  }
> }{code}
> Now when we want to convert this into a column using col(a,'sum(imps_l)') then that array will get mostly numbers but also some string entries 'sum(imps_l)' which is the key name. I need purely integers in the column.
> Should the timeseries() have output values for all functions even if there are no documents in the bucket? Or is there something similar to the select() expression that can take a stream of tuples not originating directly from search() and replace values? Or is there perhaps a function that can loop through the column produced by col() and replace non-numeric values with 0?



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

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