{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/16848","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16848/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16848/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16848/events","html_url":"https://github.com/elastic/elasticsearch/issues/16848","id":137184094,"number":16848,"title":"Introduce additional frequency metric other than term frequency ","user":{"login":"Mahathi-Bhagavatula","id":7352856,"avatar_url":"https://avatars.githubusercontent.com/u/7352856?v=3","gravatar_id":"","url":"https://api.github.com/users/Mahathi-Bhagavatula","html_url":"https://github.com/Mahathi-Bhagavatula","followers_url":"https://api.github.com/users/Mahathi-Bhagavatula/followers","following_url":"https://api.github.com/users/Mahathi-Bhagavatula/following{/other_user}","gists_url":"https://api.github.com/users/Mahathi-Bhagavatula/gists{/gist_id}","starred_url":"https://api.github.com/users/Mahathi-Bhagavatula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mahathi-Bhagavatula/subscriptions","organizations_url":"https://api.github.com/users/Mahathi-Bhagavatula/orgs","repos_url":"https://api.github.com/users/Mahathi-Bhagavatula/repos","events_url":"https://api.github.com/users/Mahathi-Bhagavatula/events{/privacy}","received_events_url":"https://api.github.com/users/Mahathi-Bhagavatula/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T08:26:56Z","updated_at":"2016-02-29T08:53:42Z","closed_at":"2016-02-29T08:53:42Z","body":"<!--\r\nGitHub is reserved for bug reports and feature requests. The best place\r\nto ask a general question is at the Elastic Discourse forums at\r\nhttps://discuss.elastic.co. If you are in fact posting a bug report or\r\na feature request, please include one and only one of the below blocks\r\nin your new issue.\r\n-->\r\n\r\n<!--\r\nIf you are filing a bug report, please remove the below feature\r\nrequest block and provide responses for all of the below items.\r\n-->\r\n\r\n**Elasticsearch version**: 1.7.2\r\n\r\n**JVM version**:  1.8\r\n\r\n**OS version**: 14.0 Ubuntu\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\nI want to introduce additional frequency metric on top of term frequency at index time. The frequency metric is calculated based on the term-document matrix.\r\n\r\nI tried overriding DefaultSimilarity.Java. The class contains the term frequency, document frequency information. But, the mapping of the term frequency to the term and document is missing in that class.\r\n\r\nI tried using ScoreFunctionBuilder.Java to modify the scoring at query time. But, the score is independent of term-frequency and only depends on the modified scoring logic. \r\n\r\nI want the exact class which calculates the term frequency and document frequency and can we override the class using a plugin. Kindly help me out on this issue.\r\n\r\nAlso, the inference from Mastering Elasticsearch Guide book  is that term frequency is calculated and stored at the time of Indexing. If this is correct, please let me know the class which calculates the term frequency at the time of Indexing. Also correct me if I am wrong.\r\n\r\n\r\n"}}