Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plan to support wildcard index like MongoDB #451

Open
xqzhou opened this issue Feb 24, 2022 · 0 comments
Open

Any plan to support wildcard index like MongoDB #451

xqzhou opened this issue Feb 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@xqzhou
Copy link

xqzhou commented Feb 24, 2022

Proposal

For the following example documents:

{
  "product": "iPhone",
  "attributes": {
    "storage": 16,
    "camera": 1200
  }
},
{
  "product": "Jacket",
  "attributes": {
    "size": "XL",
    "color": "Black"
  }
}

It would be convenient to create an wildcard index like:

CREATE INDEX on idx_prod_attrs on product (attribuites.$) 

Query can then filter by any of the possible attribute keys and speed up by index:

SELECT * FROM product where attributes.storage >= 16;
SELECT * FROM product where attributes.size = 'XL';

Motivation

MongoDB support this type of index
https://www.mongodb.com/blog/post/coming-in-mongodb-42--1-wildcard-indexes

@xqzhou xqzhou added the enhancement New feature or request label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant