setup: - do: indices.create: index: test body: settings: number_of_replicas: 0 mappings: properties: tags: type: rank_features negative_reviews: type: rank_features positive_score_impact: false - do: index: index: test id: 1 body: tags: foo: 3 bar: 5 negative_reviews: 1star: 10 2star: 1 - do: index: index: test id: 2 body: tags: bar: 6 quux: 10 negative_reviews: 1star: 1 2star: 10 - do: indices.refresh: {} --- "Log": - do: search: rest_total_hits_as_int: true body: query: rank_feature: field: tags.bar log: scaling_factor: 3 - match: hits.total: 2 - match: hits.hits.0._id: "2" - match: hits.hits.1._id: "1" --- "Saturation": - do: search: rest_total_hits_as_int: true body: query: rank_feature: field: tags.bar saturation: pivot: 20 - match: hits.total: 2 - match: hits.hits.0._id: "2" - match: hits.hits.1._id: "1" --- "Sigmoid": - do: search: rest_total_hits_as_int: true body: query: rank_feature: field: tags.bar sigmoid: pivot: 20 exponent: 0.6 - match: hits.total: 2 - match: hits.hits.0._id: "2" - match: hits.hits.1._id: "1" --- "Linear negative impact": - do: search: index: test body: query: rank_feature: field: negative_reviews.1star linear: {} - match: hits.hits.0._id: "2" - match: hits.hits.1._id: "1" - do: search: index: test body: query: rank_feature: field: negative_reviews.2star linear: {} - match: hits.hits.0._id: "1" - match: hits.hits.1._id: "2"