I can't refer the calculated variable as "script_field" or
"doc['script_field'].value", both are throwing errors.
Is there any way to reuse the script fields in custom scoring queries?
No. As far as I understand "script_fields" are like "fields",
"highlight" fields, they are all created pretty much after all document
(IDs) have been rounded up. Therefore they are not something you can
refer to in a query or filter, so you can't use them as a 'macro'.
Given that, as it says on the customer score query page, you can put the
script and parameter values, as you wrote right in your query.
-Paul
On 8/30/2012 7:57 AM, drcivan wrote:
Hi,
I have a calculated script field, similar to following example:
I can't refer the calculated variable as "script_field" or
"doc['script_field'].value", both are throwing errors.
Is there any way to reuse the script fields in custom scoring queries?
No. As far as I understand "script_fields" are like "fields",
"highlight" fields, they are all created pretty much after all document
(IDs) have been rounded up. Therefore they are not something you can
refer to in a query or filter, so you can't use them as a 'macro'.
Given that, as it says on the customer score query page, you can put the
script and parameter values, as you wrote right in your query.
-Paul
On 8/30/2012 7:57 AM, drcivan wrote:
Hi,
I have a calculated script field, similar to following example:
I can't refer the calculated variable as "script_field" or
"doc['script_field'].value", both are throwing errors.
Is there any way to reuse the script fields in custom scoring queries?
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.