Hi,
I am having the following issue:
When I setup a map/reduce index and I have a field in the index that is numeric on which I define a sort as double. I am not able to get the sort working.
I have tried both with and without field storage.
I have a solution attached and some detail below
Any insight into the issue would be greatly appreciated.
Details:
Raven Version : 2.5
Build : 2910
I have the following document types
Collection1 (Tag):
TagUuid
TagSpecificationUuid
......
Collection2 (Program)
TagUuid
TagSpecificationUuid
NumberOfYears
......
I have the map/reduce setup the following way
First map is setup on program with tag fields defaults. There is a where clause on tagspecificationuuid
Second map is setup on tag with program fields defaults. There is a where clause on tagspecificationuuid
Reduce then goes off the tagUuid as the key.
To verify this I go to raven studio and query the index with a sort on number of years
When I do this I do not get expected results. The output is not sorted by number of years.
Not sure what I am doing wrong.
To run the solution
1) Crrate a database called "TestIndexing"
1) Change the app.configuration entry for RavenDataStoreServer to the appropriate url (it is defaulted to localhost:8080)
2) run the application
3) choose either option 1 or option 2 to create an index with field storage or without for number of years (this will create your map reduce)
4) choose option 3 to load data.
You will see here that after you run this and go to studio the results will be unsorted even with sorting defined in the query.