Nicholas Waltham created NUTCH-1611:
---------------------------------------

             Summary: 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


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to