{"action":"created","issue":{"url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/181","repository_url":"https://api.github.com/repos/bloomberg/lucene-solr","labels_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/181/comments","events_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/181/events","html_url":"https://github.com/bloomberg/lucene-solr/issues/181","id":187385278,"number":181,"title":"How does an external feature affect the ranking?","user":{"login":"MickaelBZH","id":10652186,"avatar_url":"https://avatars.githubusercontent.com/u/10652186?v=3","gravatar_id":"","url":"https://api.github.com/users/MickaelBZH","html_url":"https://github.com/MickaelBZH","followers_url":"https://api.github.com/users/MickaelBZH/followers","following_url":"https://api.github.com/users/MickaelBZH/following{/other_user}","gists_url":"https://api.github.com/users/MickaelBZH/gists{/gist_id}","starred_url":"https://api.github.com/users/MickaelBZH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MickaelBZH/subscriptions","organizations_url":"https://api.github.com/users/MickaelBZH/orgs","repos_url":"https://api.github.com/users/MickaelBZH/repos","events_url":"https://api.github.com/users/MickaelBZH/events{/privacy}","received_events_url":"https://api.github.com/users/MickaelBZH/received_events","type":"User","site_admin":false},"labels":[{"id":317567148,"url":"https://api.github.com/repos/bloomberg/lucene-solr/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-04T16:55:20Z","updated_at":"2016-11-07T15:17:08Z","closed_at":null,"body":"Hi,\r\n\r\nThere is something I don't really understand after reading the readme about the external feature:\r\n\r\n {\r\n   \"name\" : \"userFromMobile\",\r\n   \"class\" : \"org.apache.solr.ltr.feature.ValueFeature\",\r\n   \"params\" : { \"value\" : \"${userFromMobile}\", \"required\":true }\r\n }\r\n\r\nHow can userFromMobile affect the ranking? It does affect the score according its weight, but it's for all documents ... so how is it supposed to affect the ranking? Did I miss something?"},"comment":{"url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/comments/258862993","html_url":"https://github.com/bloomberg/lucene-solr/issues/181#issuecomment-258862993","issue_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/181","id":258862993,"user":{"login":"diegoceccarelli","id":1099022,"avatar_url":"https://avatars.githubusercontent.com/u/1099022?v=3","gravatar_id":"","url":"https://api.github.com/users/diegoceccarelli","html_url":"https://github.com/diegoceccarelli","followers_url":"https://api.github.com/users/diegoceccarelli/followers","following_url":"https://api.github.com/users/diegoceccarelli/following{/other_user}","gists_url":"https://api.github.com/users/diegoceccarelli/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoceccarelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoceccarelli/subscriptions","organizations_url":"https://api.github.com/users/diegoceccarelli/orgs","repos_url":"https://api.github.com/users/diegoceccarelli/repos","events_url":"https://api.github.com/users/diegoceccarelli/events{/privacy}","received_events_url":"https://api.github.com/users/diegoceccarelli/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T15:17:08Z","updated_at":"2016-11-07T15:17:08Z","body":"@MickaelBZH Thanks for your question, the model will not learn about a particular `docID`, but you can have a feature `isMostClicked` . As example, you could store in a database table, the couple `docID, number of clicks from mobile` , and then at query time, check if the number of clicks is greater than a threshold (or using the number of clicks as a feature!), your training data at that point will be:\r\n\r\n`query|docID|userFromMobile|**isMostClicked**|has_clicked|CLICK_LOG`\r\n\r\nwhere `**isMostClicked**` will measure if at the moment of the interaction the document had a large number of clicks. In this way you will learn how to boost documents that you've been the most clicked if the user was from mobile for a specific query (although I'll be careful because you could return only old documents :)).   Note: you could also store the number of clicks from non mobile devices and then have a feature that compares those numbers (e.g., `number of clicks from mobile` / `number of clicks from other devices`) \r\nPlease let us know if that helps :) \r\n"}}
{"actor":{"display_login":"diegoceccarelli"}}