curl - couchdb having trouble querying by a specific key or value -
Currently, there are three documents in my database, and it looks like:
{ "Total_rows": 3, "offset": 0, "rows": [{"id": "hello-world", "key": "2009/01/15 15:52:20", "value": " Hello World "}, {" id ":" biking "," key ":" 2009/01/30 18:04:11 "," value ":" biking "}, {" id ":" Bought-A I want to ask a specific value: "Billy", "key": "2009/02/17 21:13:39", "value": "bought a cat"}]} I am "biking" using the following command:
C: \ Users \ Alex & gt; curl http://127.0.0.1:984/alex/_design/example/_view/byDate?value="Biking " It should return only line with the" biking "value But instead it gives the same results as shown above. I am indexing all this on the Windows field with the key field, so what can I do?
It is not possible to query a value in your case You will need to create another view where the code will be emitted as a data key from the value field. curl http://127.0.0.1:984/alex/ _design/example/_view / byName? Keep in mind also that the key query parameter should contain valid JSON values, so on Windows, you will see a key parameter Have to set around double quote.
Comments
Post a Comment