0

I have a search index named _design/filters in Cloudant that has the following:

index("active", doc.active, {"store": true, "index": false });

My document looks like this:

{ "_id": "12345", "active": false }

When I do a retrieval I get the active property as a string and not a boolean. Is there a way I can make it so it returns a boolean?

bryan
  • 7,656
  • 12
  • 65
  • 136
  • Just to test, I created a sample doc in CouchDB 2.1.1 with a Boolean key/value. When I do a GET request with curl, I receive the document like this: `{"_id":"doc13","_rev":"2-862bb5c8c94c4a520c435ab8037cf6ff","name":"John","title":"Geek","cool":true}` In my case the Boolean value is NOT returned as string but as a true boolean – user3405291 Mar 29 '18 at 16:56
  • Thanks for the double check. Did you by chance check in Cloudant? as it might be a cloudant specific issue @user3405291 – bryan Mar 29 '18 at 18:13

1 Answers1

1

I'd expect a boolean as well.

If the document you've shown here is just one example among many currently in your database, then it's possible there's a single document elsewhere in their database where active: "false" exists.