Function scores for Search
Elastic allows you to do to function scores, which allow us flexibility in manipulating results during certain queries. is this coming to Atlas Search?
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html
We now support a variety of function scores including constant, arithmetic, gaussian, path, score, and unary operators.
-
Yurii commented
I am using Atlas search but it takes too long to do a search + sort results after by a certain field for cases when the result amount is nearly 500K documents. Since $search doesn't leverage regular indexes it would be great to use Atlas search indexes after $search stage on further stages.
For example:db.users.aggregate([{$search: {"index": "default","compound": {"must": [{"text": {"query": "Spec","path": "key"}},{"wildcard": {"allowAnalyzedField": true,"query": ["*500*"],"path": "value"}}],"filter": [{"compound": {"should": [{"equals": {"path": "parent","value": ObjectId('5ec1444bd3f0fa00241eb6d1')}}],"minimumShouldMatch": 1}}]}}}, {$sort: {"createdAt":1}}])