[
https://issues.apache.org/jira/browse/COUCHDB-2867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962080#comment-15962080
]
Jan Lehnardt commented on COUCHDB-2867:
---------------------------------------
[~tonysun83] raised on other issue about indexing [sub-]objects in lists:
https://issues.apache.org/jira/browse/COUCHDB-2927?focusedCommentId=15132733&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15132733
I do like [~buhrmi]’s suggestion in here:
https://issues.apache.org/jira/browse/COUCHDB-2927?focusedCommentId=15962033&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15962033
This would mean dialling up the smarts of `mango_util:parse_field()`
(https://github.com/apache/couchdb/blob/master/src/mango/src/mango_util.erl#L372-L388)
but that looks doable.
We should look at how MongoDB does the syntax for this type of stuff, and if it
differs from the text fields (not sure if that syntax was borrowed from MongoDB
or Lucene).
> Mango: should be able to index *within* arrays
> ----------------------------------------------
>
> Key: COUCHDB-2867
> URL: https://issues.apache.org/jira/browse/COUCHDB-2867
> Project: CouchDB
> Issue Type: Improvement
> Components: Mango
> Reporter: Nolan Lawson
>
> If you have a document like:
> {code:javascript}
> {
> "_id": "foo",
> "tags": ["a", "b", "c"]
> }
> {code}
> ...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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)