[ 
https://issues.apache.org/jira/browse/NUTCH-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556821#comment-17556821
 ] 

Sebastian Nagel commented on NUTCH-1611:
----------------------------------------

Need to clarify whether this should be fixed for 1.x

> 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, 1.16
>         Environment: All
>            Reporter: Nicholas Waltham
>            Priority: Major
>         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
(v8.20.7#820007)

Reply via email to