[SERVER-48897] Allow sub-field matching in Wildcard indexes Created: 16/Jun/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: 4.2.7
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Chad Kreimendahl Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 1
Labels: qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-44558 wildcardProjection not available for ... Backlog
related to SERVER-267 Wildcard support in index/query/proje... Backlog
Assigned Teams:
Query Optimization
Participants:

 Description   

Allow for the simple creation of a wildcard index that indexes specific patterns below the wildcard:

 

db.collection.createIndex(
  { "FieldHolder.$**.SearchSort": 1 }
)

 

 

To capture only the SearchSort fields in an example like this:

 

 

{
    FieldHolder: {
        Field1: {
            Meta: { Some: "Metadata we dont want to index" },
            More: { Metadata: "we don't want to index"},
            Value: "Some Value",
            SearchSort: "some value"
        },
        Field2: {
            Meta: { Some: "Metadata we dont want to index" },
            More: { Metadata: "we don't want to index"},
            Value: 1,
            SearchSort: "1",
        },
        Field3....
    }
}

 

This would also more easily allow the implementation of non-sparse indexing on wildcards, where you could forcibly assume the existence of some field (SearchSort in this case)

 



 Comments   
Comment by Carl Champain (Inactive) [ 17/Jun/20 ]

Hi chad@onspring.com,

Thank you for the report.
We're passing this ticket along to the appropriate team for further review. Updates will be posted on this ticket as they happen.

Kind regards,
Carl

Generated at Thu Feb 08 05:18:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.