elasticsearch


Get max-score of Elasticsearch in CakePHP 3


I am trying to integrate Elasticsearch with CakePHP, and i couldn't figure out how to get the max-score like in json response:
"hits": {
"total": 1,
"max_score": 0.032739405,
"hits": [....]
}
The query in my controller works as expected, i know that there must be a way to get the max score after the query.
$this->loadModel("Articles", 'Elastic');
$articles = $this->Articles->find();
$articles->where(function ($builder) {
return $builder->query([
'match_phrase'=>[
'title'=>$this->getValue('query')
]
]);
});

Related Links

elasticsearch edge_ngrams analyzer is not found
Double wildcard in query causes weird highlighting for plain/fast vectors elasticsearch highlighters
Get Elasticsearch response in DataTable in C#.Net
Elasticsearch NoNodeAvailableException issue
Why Elasticsearch snapshot stats number_of_files differs from actual indices count?
Specifying data type and analyzer while creating index
elasticsearch regroups aggs by regex
get unique values from elasticsearch
Elasticsearch dies on primary node at random times. What should I look for in troubleshooting?
elasticsearch problems with queries
Normalize elasticsearch query/results
ElasticSearch max shard size
Elasticsearch: Group results of different types in response structure
Storing data in Elasticsearch - OLTP
Elasticsearch + Shield, security_exception happens when Document Level Security is enabled
ElasticSearch Parent/Child Restriction

Categories

HOME
angular-ui-grid
long-integer
concurrency
sentry
sympy
parsley.js
buffer
stimulsoft
spring-jpa
xbox360
corona
fosuserbundle
bazaar
azure-machine-learning
uislider
device
high-availability
background-color
running-object-table
marquee
django-import-export
amazon-cloudtrail
om-next
ms-media-foundation
nest
nppexec
assertions
strapi
elastica
klee
flipkart
opal-framework
vungle-ads
elasticsearch-aggregation
web-inspector
ilrepack
solr-query-syntax
visual-format-language
android-sharing
watir-webdriver
word-2007
ptvs
dtd
front-camera
hmmlearn
annotatorjs
nclam
visual-studio-monaco
django-testing
always-on-top
android-sdcard
seadragon
servicestack-bsd
textpattern
openshift-cartridge
netdatacontractserializer
blockquote
gql
supersocket.net
android-handler
scala-macros
r.java-file
html-escape-characters
kognitio-wx2
fasterxml
dc
utf8-decode
multivariate-testing
maven-central
meteor-collections
xulrunner
pbkdf2
illuminate-container
statechart
tfs-sdk
android-authenticator
semantic-merge
zend-pdf
wndproc
taskkill
flymake
acpi
memory-pool
snackjs
getopts
nsrangeexception
grails-validation
mongrel2
solandra
facebook-fbml
rakudo
icon-language
rendering-engine

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile