I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
Forgive me but I'm confused. Following your advise on using
AbstractFloatSearchScript I have created the following class: Elastic Search Custom Script · GitHub. You then mentioned in your next
reply the score() method. In my runAsFloat() method do I need to add
score() to the value of my function? Does Elastic automatically call
runAsFloat() to get the score when I run the following search query (I
assume it's correct)?:
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
It uses the score you return in your function. If you want to use the current calculated score (the one computed based on matching the query, as you did in your script, then you can use the score() function to get it).
On Friday, June 17, 2011 at 3:02 AM, thnguyen wrote:
Forgive me but I'm confused. Following your advise on using
AbstractFloatSearchScript I have created the following class: Elastic Search Custom Script · GitHub. You then mentioned in your next
reply the score() method. In my runAsFloat() method do I need to add
score() to the value of my function? Does Elastic automatically call
runAsFloat() to get the score when I run the following search query (I
assume it's correct)?:
On Thursday, June 16, 2011 at 10:03 PM, thnguyen wrote:
Hello,
I'm attempting to run a custom scoring search that includes a script
that was ported over from a Solr boost function. Initial requests to
Elastic never return with a response. I must wait a long time after
sending the initial request before receiving a response from
subsequent request. To me is seems like maybe there is some type of
compilation and loading of the script that is causing that long wait
(unfamiliar of ES internals). Here is a subset of the entire script
that I want to run:
What is causing the search to be so slow? BTW the "daysSinceRelease"
field is mapped to the integer datatype and I have 146k documents.
Also this search is super fast in Solr.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.