{"action":"opened","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/1175","repository_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/1175/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/1175/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/1175/events","html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/1175","id":194409614,"number":1175,"title":"Map sort results per entity","user":{"login":"deshymers","id":1458776,"avatar_url":"https://avatars.githubusercontent.com/u/1458776?v=3","gravatar_id":"","url":"https://api.github.com/users/deshymers","html_url":"https://github.com/deshymers","followers_url":"https://api.github.com/users/deshymers/followers","following_url":"https://api.github.com/users/deshymers/following{/other_user}","gists_url":"https://api.github.com/users/deshymers/gists{/gist_id}","starred_url":"https://api.github.com/users/deshymers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deshymers/subscriptions","organizations_url":"https://api.github.com/users/deshymers/orgs","repos_url":"https://api.github.com/users/deshymers/repos","events_url":"https://api.github.com/users/deshymers/events{/privacy}","received_events_url":"https://api.github.com/users/deshymers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-08T18:30:19Z","updated_at":"2016-12-08T18:30:19Z","closed_at":null,"body":"Hello, \r\n\r\nCurrently we are using Elastic Search for geospatial searches, and are sorting results based on distance from a specific location, this distance is returned in the results for each entity found. I would like to map that value back to my entity in a property. This will change each time the location changes, and will be used as a visual indicator to the user and not saved to the db.\r\n\r\nI believe I need to use the Elastica to Model transformer, but form my reading that only changes how the entity is fetched from your DB using the id of the item. \r\n\r\nHere is a sample of the results we current get from elastic search;\r\n\r\n`\"hits\": [\r\n         {\r\n            \"_index\": \"app\",\r\n            \"_type\": \"listings\",\r\n            \"_id\": \"1035\",\r\n            \"_score\": 0,\r\n            \"_source\": {\r\n               ....\r\n            },\r\n            \"sort\": [\r\n               0.7435547133954025,\r\n               0,\r\n               0,\r\n               0,\r\n               \"0.00\",\r\n               \"0\"\r\n            ]\r\n         },`\r\n\r\nAs you can see the results contain a sort object, and the first one is value we want to map.\r\n\r\nThanks!"}}
{"actor":{"display_login":"deshymers"}}