Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2867

Mango: should be able to index *within* arrays

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Mango
    • None

    Description

      If you have a document like:

      {
        "_id": "foo",
        "tags": ["a", "b", "c"]
      }
      

      ...then you should be able to run queries that find e.g. all documents with "a" as a tag, and it should be indexed. Currently there doesn't seem to be any way to do this except as an in-memory selector, which is a real bummer, because it's a super common use case. (Tags, categories, labels, etc.)

      Originally I thought this was how $elemMatch worked, and I was surprised to learn that that's not the case.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nolanlawson Nolan Lawson
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: