Elasticsearch Server - Third Edition by Rafal Kuc & Marek Rogozinski
Author:Rafal Kuc & Marek Rogozinski [Kuc, Rafal]
Language: eng
Format: epub, mobi
Publisher: Packt Publishing
Published: 2016-02-28T23:00:00+00:00
Field value factor function
The field_value_factor function allows us to influence the score of the document by using a value of the field in that document. For example, to multiply the score of the document by the value of the year field, we run the following query:
curl -XGET 'localhost:9200/library/_search?pretty' -d '{ "query" : { "function_score" : { "query" : { "term" : { "available" : true } }, "functions" : [ { "field_value_factor" : { "field" : "year", "missing" : 1 } } ] } } }'
In addition to choosing the field whose value should be used, we can also control the behavior of the field value factor function by using the following properties:
factor: The multiplication factor that will be used along with the field value. It defaults to 1.
modifier: The modifier that will be applied to the field value. It defaults to none. It can take the value of log, log1p, log2p, ln, ln1p, ln2p, square, sqrt, and reciprocal.
missing: The value that should be used when a document doesn't have any value in the field specified in the field property.
Download
Elasticsearch Server - Third Edition by Rafal Kuc & Marek Rogozinski.mobi
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12571)
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Dependency Injection in .NET by Mark Seemann(9340)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8299)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7083)
Microservices with Go by Alexander Shuiskov(6853)
Practical Design Patterns for Java Developers by Miroslav Wengner(6770)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6711)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6416)
Angular Projects - Third Edition by Aristeidis Bampakos(6116)
The Art of Crafting User Stories by The Art of Crafting User Stories(5645)
NetSuite for Consultants - Second Edition by Peter Ries(5577)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5382)
Kotlin in Action by Dmitry Jemerov(5065)
