Skip to content

DATAMONGO-1467 - Add support for MongoDB 3.2 partialFilterExpression for index creation. #431

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

Closed
wants to merge 2 commits into from

Conversation

christophstrobl
Copy link
Member

We now support partialFilterExpression via partial. This allows to create partial indexes that only index the documents in a collection that meet a specified filter expression.

new Index().named("idx").on("k3y", ASC).partial(filter(where("age").gte(10)))

The filter expression can be set via a plain DBObject or a CriteriaDefinition and is mapped against the associated domain type.


Relates to: #380

…for index creation.

We now support `partialFilterExpression` via `partial`. This allows to create partial indexes that only index the documents in a collection that meet a specified filter expression. 

  new Index().named("idx").on("k3y", ASC).partial(filter(where("age").gte(10)))

The filter expression can be set via a plain `DBObject` or a `CriteriaDefinition` and is mapped against the associated domain type.
odrotbohm pushed a commit that referenced this pull request Dec 19, 2016
…for index creation.

We now support partial filter expression on indexes via Index.partial(…). This allows to create partial indexes that only index the documents in a collection that meet a specified filter expression. 

new Index().named("idx").on("k3y", ASC).partial(filter(where("age").gte(10)))

The filter expression can be set via a plain DBObject or a CriteriaDefinition and is mapped against the associated domain type.

Original pull request: #431.
odrotbohm added a commit that referenced this pull request Dec 19, 2016
Original pull request: #431.
odrotbohm pushed a commit that referenced this pull request Dec 19, 2016
…for index creation.

We now support partial filter expression on indexes via Index.partial(…). This allows to create partial indexes that only index the documents in a collection that meet a specified filter expression. 

new Index().named("idx").on("k3y", ASC).partial(filter(where("age").gte(10)))

The filter expression can be set via a plain DBObject or a CriteriaDefinition and is mapped against the associated domain type.

Original pull request: #431.
odrotbohm added a commit that referenced this pull request Dec 19, 2016
Original pull request: #431.
@odrotbohm odrotbohm closed this Dec 19, 2016
@odrotbohm odrotbohm deleted the issue/DATAMONGO-1467 branch December 19, 2016 18:48
christophstrobl added a commit that referenced this pull request Dec 20, 2016
…for index creation.

We now support partial filter expression on indexes via Index.partial(…). This allows to create partial indexes that only index the documents in a collection that meet a specified filter expression.

new Index().named("idx").on("k3y", ASC).partial(filter(where("age").gte(10)))

The filter expression can be set via a plain DBObject or a CriteriaDefinition and is mapped against the associated domain type.

Original pull request: #431.
christophstrobl pushed a commit that referenced this pull request Dec 20, 2016
Original pull request: #431.
@vibhaG
Copy link

vibhaG commented Aug 31, 2017

Does the Mongo compound index support partial ind.ex filters?
For example {ID: 1, realm: 1},
{unique: true,
partialFilterExpression: { type: { $eq: "externalUser" } } }
)
If it does, I was not able to figure out how that works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants