{"action":"created","issue":{"url":"https://api.github.com/repos/olivere/elastic/issues/85","labels_url":"https://api.github.com/repos/olivere/elastic/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/olivere/elastic/issues/85/comments","events_url":"https://api.github.com/repos/olivere/elastic/issues/85/events","html_url":"https://github.com/olivere/elastic/issues/85","id":88773367,"number":85,"title":"Function score weight not supported parsing exception","user":{"login":"andywhittle","id":190931,"avatar_url":"https://avatars.githubusercontent.com/u/190931?v=3","gravatar_id":"","url":"https://api.github.com/users/andywhittle","html_url":"https://github.com/andywhittle","followers_url":"https://api.github.com/users/andywhittle/followers","following_url":"https://api.github.com/users/andywhittle/following{/other_user}","gists_url":"https://api.github.com/users/andywhittle/gists{/gist_id}","starred_url":"https://api.github.com/users/andywhittle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andywhittle/subscriptions","organizations_url":"https://api.github.com/users/andywhittle/orgs","repos_url":"https://api.github.com/users/andywhittle/repos","events_url":"https://api.github.com/users/andywhittle/events{/privacy}","received_events_url":"https://api.github.com/users/andywhittle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-16T16:22:22Z","updated_at":"2015-06-17T14:44:49Z","closed_at":null,"body":"As per the discussion in https://github.com/olivere/elastic/issues/74#issuecomment-105446354, the function weighting is still causing an issue. I am getting the following exception raised when adding the weight onto a score function, as per the test example (https://github.com/olivere/elastic/blob/master/search_queries_fsq_test.go#L72)\r\n\r\n            QueryParsingException[[.....] field_value_factor query does not support [weight]\r\n\r\nAs far as I can tell this needs adding to the FunctionScoreQuery similar to the original PR implementation.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/olivere/elastic/issues/comments/112828105","html_url":"https://github.com/olivere/elastic/issues/85#issuecomment-112828105","issue_url":"https://api.github.com/repos/olivere/elastic/issues/85","id":112828105,"user":{"login":"olivere","id":134848,"avatar_url":"https://avatars.githubusercontent.com/u/134848?v=3","gravatar_id":"","url":"https://api.github.com/users/olivere","html_url":"https://github.com/olivere","followers_url":"https://api.github.com/users/olivere/followers","following_url":"https://api.github.com/users/olivere/following{/other_user}","gists_url":"https://api.github.com/users/olivere/gists{/gist_id}","starred_url":"https://api.github.com/users/olivere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivere/subscriptions","organizations_url":"https://api.github.com/users/olivere/orgs","repos_url":"https://api.github.com/users/olivere/repos","events_url":"https://api.github.com/users/olivere/events{/privacy}","received_events_url":"https://api.github.com/users/olivere/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T14:44:49Z","updated_at":"2015-06-17T14:44:49Z","body":"Actually, scrap that. [`ScoreFunctionBuilder.toXContent`](https://github.com/elastic/elasticsearch/blob/1.6/src/main/java/org/elasticsearch/index/query/functionscore/ScoreFunctionBuilder.java#L45) is what's called from the query builders. It adds the `weight` (if specified), then wraps the derived query with `doXContent`.\r\n\r\nSo I guess the generated JSON in Elastic is wrong, hence your syntax error.\r\n\r\nI'll check that now.\r\n\r\n"}}