spring-projects/spring-data-mongodb — pull request #198 by christophstrobl (2014-07-02 09:40:15+00:00)
Title: DATAMONGO-937, DATAMONGO-850, DATAMONGO-976 - Support for $text $search.

We now support creating text index based on information gathered on domain types.

Using `@TextIndexed` marks properties to be considered for the full text index. Use the `weight` attribute to influence document scoring during search operations.

Please note that using `@TextIndexed` on entity properties forces all properties of any sub document to be considered as part of the text index. Any set weight will in that case be propagated to the siblings taking the most recent weight information into account, which means that a the weight attribute can be overridden for properties in sub documents.

The default language can be done via `@Document(language)` while `@Language` can be used to define the `language_override` field.

Using `TextQuery` and `TextCriteria` allows creation of queries for `$text $search`.

`{ $meta : “textScore” }` can be included using `TextQuery.includeScore()`. As the fieldname used for `textScore` must not be fixed to _score_ one can use the overload taking the fieldname to override the default.

To map `{ $meta : “textScore” }` we introduced `@TextScore`. Different to `@Transient` the value will be considered when reading documents.