DATAMONGO-973 - Add support for deriving fulltext queries.

We’ve introduced text query specific methods for MongoRepository that allow direct usage of TextCriteria.

Retrieving document score and sorting by score is only possible if the entity holds a property annotated with @TextScore. If present, any find execution will be enriched so that it asserts loading of the according { $meta : textScore } field. The sort object will only be mapped in case the existing sort property already exists - in that case we replace the existing expression for the property with its $meta representation.

This allows for example the following:

TextCriteria crit = TextCriteria.forDefaultLanguage().matching(“term”);
* findAllBy(crit, new Sort(“score”))
* findBy(crit, new PageRequest(0, 10, Direction.DESC, “score”))
* findByFooOrderByScoreDesc(“foo”, crit)

Remaining tasks:
* Update Reference documentation
DATAMONGO-973 - Add support for deriving fulltext queries.

We’ve introduced text query specific methods for MongoRepository that allow direct usage of TextCriteria.

Retrieving document score and sorting by score is only possible if the entity holds a property annotated with @TextScore. If present, any find execution will be enriched so that it asserts loading of the according { $meta : textScore } field. The sort object will only be mapped in case the existing sort property already exists - in that case we replace the existing expression for the property with its $meta representation.

This allows for example the following:

TextCriteria crit = TextCriteria.forDefaultLanguage().matching(“term”);
* findAllBy(crit, new Sort(“score”))
* findBy(crit, new PageRequest(0, 10, Direction.DESC, “score”))
* findByFooOrderByScoreDesc(“foo”, crit)

For more details and examples see the ‘Full text search queries’ section in the reference manual.