1

On my CouchDB DB, I have created a view with key ["userId", "startdate"]

I must get data from different userId and a range date. I have tried some of solutions, example :

{
    "keys": [
        {
            "startkey": ["userID_A","2014-05-02"],
            "endkey": ["userID_A", "2015-05-02",{}]
            ]
        },
        {
            "startkey": ["userID_B","2014-05-02"],
            "endkey": ["userID_B","2015-05-02",{}]
            ]
        }
    ]
}

But it doesn't work...

This website is useful, and give a good example : (here to recup all posts of a category A or B in March 2010 -> June 2010

{
    "keys": [
        {
            "startkey": ["Category A","2010","03"],
            "endkey": ["Category A","2010","06",{}]
        },
        {
            "startkey": ["Category B","2010","03"],
            "endkey": ["Category B","2010","06",{}]
        }
    ]
}

Some have any idea?

Note : I need perform that in Java, with Ektorp. If someone has already do that...

EDIT : I think that my post is a duplicate. Similar post here.

Community
  • 1
  • 1
Azylaans
  • 981
  • 8
  • 18

0 Answers0