Skip to content

#DATAMONGO-1561 #442

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 100 commits into from
Closed

#DATAMONGO-1561 #442

wants to merge 100 commits into from

Conversation

yacota
Copy link
Contributor

@yacota yacota commented Feb 18, 2017

Full text indexing nested documents when there are concrete fields to be indexed is a little bit overkill IMO.
With current behaviour when a new field is added to the nested entity an exception is thrown because text index's definition can not change(only one text index per collection is allowed), this PR tries to avoid this problem

odrotbohm and others added 30 commits November 23, 2016 13:52
…egation $group stage.

Original Pull Request: spring-projects#360
CLA: 171720160409030719 (Gustavo de Geus)
Just added overloads for stdDevSamp and stdDevPop taking AggregationExpression and updated the doc.
Also replaced String operation based MongoDB operation building by using operators directly.

Original Pull Request: spring-projects#360
We new support $filter in aggregation pipeline.

Aggregation.newAggregation(Sales.class,
	Aggregation.project()
		.and(filter("items").as("item").by(GTE.of(field("item.price"), 100)))
		.as("items"))

Original pull request: spring-projects#412.
Remove variable before returning value. Add generics for list creation.

Original pull request: spring-projects#412.
…roup & project.

We now directly support comparison aggregation operators ($cmp, $eq, $gt, $gte, $lt, $lte and $ne) on both group and project stages.

Original pull request: spring-projects#414.
Add JavaDoc for compareValue.

Original pull request: spring-projects#414.
Add missing transformations for ConstructorReference, OperatorNot, OpNE, OpEQ, OpGT, OpGE, OpLT, OpLE, OperatorPower, OpOr and OpAnd. This allows usage of logical operators &, || and ! as part of the expression, while ConstructorReference allows instantiating eg. arrays via an expression `new int[]{4,5,6}`. This can be useful eg. comparing arrays using $setEquals.

More complex aggregation operators like $filter can be created by defining the variable references as string inside the expression like filter(a, 'num', '$$num' > 10).
Commands like $let requires usage of InlineMap to pass in required arguments like eg. let({low:1, high:'$$low'}, gt('$$low', '$$high')).

Original Pull Request: spring-projects#410
We now correctly convert entities into their MongoDB representation including type information via _class property.

Original pull request: spring-projects#415.
We now use more type information to create a better empty collection in the first place. The previous algorithm always used an empty HashSet plus a subsequent conversion using the raw collection type. Especially the latter caused problems for EnumSets as the conversion into one requires the presence of component type information.

We now use Spring's collection factory and more available type information to create a proper collection in the first place and only rely on a subsequent conversion for arrays.
Introducing dedicated annotations for manually defined count and delete queries to avoid misconfiguration and generally simplifying the declaration.

Original pull request: 416.
Renamed @count and @delete to @CountQuery and @deleteQuery. Minor polishing in test cases and test repository methods. JavaDoc, formatting.

Original pull request: spring-projects#416.
…e and set operations.

We now support the following aggregation framework operators:

- setEquals, setIntersection, setUnion, setDifference, setIsSubset, anyElementTrue, allElementsTrue
- stdDevPop, stdDevSamp
- abs, ceil, exp, floor, ln, log, log10, pow, sqrt, trunc
- arrayElementAt, concatArrays, isArray
- literal
- dayOfYear, dayOfMonth, dayOfWeek, year, month, week, hour, minute, second, millisecond, dateToString

Original pull request: spring-projects#418.
Add JavaDoc. Change visibility of AbstractAggregationExpression.getMongoMethod() to protected.

Original pull request: spring-projects#418.
…y methods.

We now support exists projections for query methods in query methods for derived and string queries.

public PersonRepository extends Repository<Person, String> {

  boolean existsByFirstname(String firstname);

  @ExistsQuery(value = "{ 'lastname' : ?0 }")
  boolean someExistQuery(String lastname);

  @query(value = "{ 'lastname' : ?0 }", exists = true)
  boolean anotherExistQuery(String lastname);
}

Original pull request: spring-projects#381.
Formatting in test case.

Original pull request: spring-projects#381.
Sorting update modifier added. Supports sorting arrays by document fields and element values.

Original pull request: spring-projects#405.
Add property to field name mapping for Sort orders by moving Sort mapping to UpdateMapper. Fix typo. Add JavaDoc. Reformat code. Remove trailing whitespaces.

Original pull request: spring-projects#405.
Aligned assertion messages for consistency. Fixed imports in  UpdateMapperUnitTests.

Original pull request: spring-projects#405.
This is required for the switch in support for multi-store detection.

Related ticket: DATACMNS-952.
We now support $map operator in aggregation.

Original pull request: spring-projects#420.
Reduce Map aggregation expression builder entrypoint. Fix JavaDoc.

Original pull request: spring-projects#420.
…iaDefinition.

We now also accept CriteriaDefinition next to Criteria for Aggregation.match. The existing match(Criteria) method remains to preserve binary compatibility.
… of AggregationExpressions.

Renamed CondOperator to Cond and IfNullOperator to IfNull. Both conditional operations are now available from ConditionalOperators.when and ConditionalOperators.ifNull and accept AggregationExpressions for conditions and values.

Original Pull Request: spring-projects#421
Added some static entry points for better readability.

Original Pull Request: spring-projects#421
We now support $let in aggregation $project stage.

ExpressionVariable total = newExpressionVariable("total").forExpression(ADD.of(field("price"), field("tax")));
ExpressionVariable discounted = newExpressionVariable("discounted").forExpression(Cond.when("applyDiscount").then(0.9D).otherwise(1.0D));

newAggregation(Sales.class,
	project()
		.and(define(total, discounted)
			.andApply(MULTIPLY.of(field("total"), field("discounted"))))
		.as("finalTotal"));

Original pull request: spring-projects#417.
Use InheritingExposedFieldsAggregationOperationContext instead of anonymous context class for condition mapping. Drop aggregation input collections before tests. Minor reformatting.

Original pull request: spring-projects#417.
We now support the following MongoDB 3.4 aggregation operators:

$indexOfBytes, $indexOfCP, $split, $strLenBytes, $strLenCP, $substrCP, $indexOfArray, $range, $reverseArray, $reduce, $zip, $in, $isoDayOfWeek, $isoWeek, $isoWeekYear, $switch and $type.

Original pull request: spring-projects#423.
mp911de and others added 26 commits January 12, 2017 17:08
Convert @see http://… links to valid format using @see <a href=…>…</a>
…er type.

We now allow using sub types as arguments for derived queries. This makes it possible to use eg. a GeoJsonPoint for querying while the declared property type in the domain object remains a regular (legacy) Point.

Original pull request: spring-projects#435.
Remove unused fields. Fix typo in method name. Reformat inner class to align formatting.

Original pull request: spring-projects#435.
…ersistable.

We now wrap the MappingMongoEntityInformation into one that delegates the methods implemented by Persistable to the actual entity in case it implements said interface.

Original pull request: spring-projects#436.
Removed some compiler warnings. Hide newly introduced class in package scope and made use of Lombok annotations to avoid boilerplate code.

Original pull request: spring-projects#436.
…ore auditing.

The core auditing implementation now skips the invocation of auditing in case the candidate aggregate doesn't need any auditing in the first place. We needed to adapt the sample class we use to actually carry the necessary auditing annotations.

Related ticket: DATACMNS-957.
Use regex groups and parameter index values for replacement in string based queries.
Extend year range in license headers. Use MongoDB JSON serializer for String escaping. Move unquoting/quote checking to inner QuotedString utility class. Reformat code.
Use correct @RelatedDocument annotation in MongoDB cross store reference documentation.
Support Decimal128 as Mongo simple type if present. Decimal128 is stored as NumberDecimal.

class Person {

  String id;
  Decimal128 decimal128;

  Person(String id, Decimal128 decimal128) {
    this.id = id;
    this.decimal128 = decimal128;
  }
}

mongoTemplate.save(new Person("foo", new Decimal128(new BigDecimal("123.456"))));

is represented as:

{ "_id" : "foo", "decimal128" : NumberDecimal("123.456") }
Remove ReflectiveSimpleTypes in favor of MongoSimpleTypes.
Add add integration test.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
Move coordinate conversion to dedicated method. Additionally fix issue with assertions applied to late in the chain and added some tests.

Original Pull Request: spring-projects#438
Throw an IllegalArgumentException when trying to create a query using 'null' as an argument for queries resulting in a $regex query operator.

Original Pull Request: spring-projects#439
Full text indexing nested documents when there are concrete fields to be indexed is a little bit overkill IMO. 
With current behaviour when a new field is added to the nested entity an exception is thrown because text index's definition can not change(only one text index per collection is allowed), this PR tries to avoid this problem
Full text indexing nested documents when there are concrete fields to be indexed is a little bit overkill IMO. 
With current behaviour when a new field is added to the nested entity an exception is thrown because text index's definition can not change(only one text index per collection is allowed), this PR tries to avoid this problem
#DATAMONGO-1561 : 
Full text indexing nested documents when there are concrete fields to be indexed is a little bit overkill IMO. 
With current behaviour when a new field is added to the nested entity an exception is thrown because text index's definition can not change(only one text index per collection is allowed), this PR tries to avoid this problem
Conflicts:
	spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java
@mp911de
Copy link
Member

mp911de commented Feb 3, 2020

The repo underwent since this PR was created a few significant changes so that this PR cannot be merged anymore. Sorry for the inconvenience.

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.