RavenDB DynamicAggregation Part 2

34 views
Skip to first unread message

Simone Belia

unread,
Mar 23, 2015, 4:16:16 AM3/23/15
to rav...@googlegroups.com
Hi all,

we have another problem (even with the latest unstable 3639)....after this

Using the attached dump follow this steps:

1. Go to reporting in Studio
2. Select the index Services/ByFinder
3. GroupBy select Code
4. Add Value Price 
5. Summarize by Max
6. Add this filter

 (((DealerId:[[EMPTY_STRING]]) OR DealerId:Dealers/000244)) AND (CarLineCode:***) AND (Series:4) AND (VersionCode:af296403\-3e75\-19b0\-8f7e\-0004ac19c65f)



Everything works good and the response is this

{
 "Results": {
   "Code-Price": {
     "Values": [
       {
         "Range": "2308f7fad74f98fafaab8bdaaf4c3219",
         "Hits": 1,
         "Count": 1,
         "Sum": null,
         "Max": 614.75,
         "Min": null,
         "Average": null
       },
       {
         "Range": "c04cb92a556ea01fe03d6e1a309c798c",
         "Hits": 1,
         "Count": 1,
         "Sum": null,
         "Max": 327.87,
         "Min": null,
         "Average": null
       }
     ],
     "RemainingTerms": [],
     "RemainingTermsCount": 0,
     "RemainingHits": 0
   }
 },
 "Duration": "00:00:00.0063720",
 "IndexStateEtag": null
}



Doing the same but with Min instead of Max the response is this

{
 "Results": {
   "Code-Price": {
     "Values": [
       {
         "Range": "2308f7fad74f98fafaab8bdaaf4c3219",
         "Hits": 1,
         "Count": 1,
         "Sum": null,
         "Max": null,
         "Min": 0.0,
         "Average": null
       },
       {
         "Range": "c04cb92a556ea01fe03d6e1a309c798c",
         "Hits": 1,
         "Count": 1,
         "Sum": null,
         "Max": null,
         "Min": 0.0,
         "Average": null
       }
     ],
     "RemainingTerms": [],
     "RemainingTermsCount": 0,
     "RemainingHits": 0
   }
 },
 "Duration": "00:00:00.0075900",
 "IndexStateEtag": null
}



as you can see the Min value is 0 instead of a real value

What is causing this?
TestDB.ravendump

Grisha Kotler

unread,
Mar 23, 2015, 4:27:03 AM3/23/15
to rav...@googlegroups.com
Hi,

The index Services/ByFinder isn't included in your dump.

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simone Belia

unread,
Mar 23, 2015, 8:24:05 AM3/23/15
to rav...@googlegroups.com
You're right.

Here is the index

Index Name: Services/ByFinder

from c in docs.Services
select new {
    DealerId = c.DealerId,
 BrandId = c.Brand,
     CarLineCode = c.CarLineCode,
   Series = c.Series,
     CarGradeCode = c.CarGradeCode,
 VersionCode = c.VersionCode,
   Code = c.Code,
 Price = c.Price
}



- Add 2 fields to the Index: 

Field1

Field Name: Series
Sort: Int

Field2

Field Name: Price
Sort: Double



Thanks

Simone Belia

unread,
Mar 24, 2015, 5:12:48 AM3/24/15
to rav...@googlegroups.com
Ping :)

anyone has a solution to this?

thanks

Grisha Kotler

unread,
Mar 24, 2015, 5:55:38 AM3/24/15
to rav...@googlegroups.com
Hi,

The fix should be in tomorrows unstable build.

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


Simone Belia

unread,
Mar 24, 2015, 4:57:49 PM3/24/15
to rav...@googlegroups.com
Thank you
Waiting for tomorrow ;)

Simone Belia

unread,
Mar 26, 2015, 10:40:42 AM3/26/15
to rav...@googlegroups.com
I tried the latest unstable 3644 and the bug is fixed

thanks
Reply all
Reply to author
Forward
0 new messages