You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Joseph Naegele (JIRA)" <ji...@apache.org> on 2016/05/26 20:55:12 UTC
[jira] [Updated] (NUTCH-1611) Elastic Search Indexer Creates field
in elastic search "boost" as a string value, so cannot be used in custom
boost queries
[ https://issues.apache.org/jira/browse/NUTCH-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joseph Naegele updated NUTCH-1611:
----------------------------------
Attachment: NUTCH-1611-1.x.patch
This is an issue in 1.x. I've attached a patch for 1.x for which all tests pass.
> Elastic Search Indexer Creates field in elastic search "boost" as a string value, so cannot be used in custom boost queries
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: NUTCH-1611
> URL: https://issues.apache.org/jira/browse/NUTCH-1611
> Project: Nutch
> Issue Type: Bug
> Components: indexer
> Affects Versions: 2.2.1
> Environment: All
> Reporter: Nicholas Waltham
> Attachments: NUTCH-1611-1.x.patch
>
>
> Ordinarily, one can use a boost field in a custom_score query in elastic search to affect the ranking, nutch create such a field. However it is store in elastic search as a string, so cannot be used. Attempt to use the boost field in a query therefore creates the following error:
> PropertyAccessException[[Error: could not access: floatValue; in class: org.elasticsearch.index.field.data.strings.StringDocFieldData]\n[Near : {... _score + (1 * doc.boost.floatValue / 100) ....}]
> example test query:
> {
> "query" : {
> "custom_score" : {
> "query" : {
> "query_string" : {
> "query" : "something"
> }},
> "script" : "_score + (1 * doc.boost.doubleValue / 100)"
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)