{"action":"created","issue":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/375","labels_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/375/labels{/name}","comments_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/375/comments","events_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/375/events","html_url":"https://github.com/matteodem/meteor-easy-search/issues/375","id":118693960,"number":375,"title":"new Tracker dependency is added to componentDict every time seachTemplate is rendered","user":{"login":"thomasspiesser","id":4850200,"avatar_url":"https://avatars.githubusercontent.com/u/4850200?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasspiesser","html_url":"https://github.com/thomasspiesser","followers_url":"https://api.github.com/users/thomasspiesser/followers","following_url":"https://api.github.com/users/thomasspiesser/following{/other_user}","gists_url":"https://api.github.com/users/thomasspiesser/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasspiesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasspiesser/subscriptions","organizations_url":"https://api.github.com/users/thomasspiesser/orgs","repos_url":"https://api.github.com/users/thomasspiesser/repos","events_url":"https://api.github.com/users/thomasspiesser/events{/privacy}","received_events_url":"https://api.github.com/users/thomasspiesser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/labels/Project:Components","name":"Project:Components","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-24T20:15:56Z","updated_at":"2015-11-25T20:15:00Z","closed_at":"2015-11-25T20:06:25Z","body":"Hey, I have a question. I noticed that every time I go to my search page a new Tracker dependency is added to the component dict. Now, when I `console.log('hello from easy:search')` in the `selector()` function of the engine like so:\r\n\r\n```javascript\r\nmyIndex = new EasySearch.Index({\r\n  collection: MyCollection,\r\n  fields: ['title'],\r\n  engine: new EasySearch.MongoDB({\r\n    selector( searchObject, options, aggregation ) {\r\n      console.log('hello from easy:search');\r\n      let selector = this.defaultConfiguration().selector( searchObject, options, aggregation );\r\n      // custom filter etc...\r\n      return selector;\r\n    },\r\n  }),\r\n});\r\n```\r\n\r\nand go from home to search and back and forth a couple of times, I get the following in the browser console:\r\n\r\n```\r\n_.keys(myIndex.getComponentDict().keyDeps.searchOptions._dependentsById)\r\n[\"70\", \"581\", \"1007\", \"1433\", \"1859\", \"2285\", \"2711\", \"3137\", \"3159\"]\r\n```\r\n\r\nand on the server console on searching 'test' for example:\r\n\r\n````\r\nI20151124-21:05:01.500(1)? hello from easy:search\r\nI20151124-21:05:01.505(1)? hello from easy:search\r\nI20151124-21:05:01.508(1)? hello from easy:search\r\nI20151124-21:05:01.511(1)? hello from easy:search\r\nI20151124-21:05:01.513(1)? hello from easy:search\r\nI20151124-21:05:01.527(1)? hello from easy:search\r\nI20151124-21:05:01.531(1)? hello from easy:search\r\nI20151124-21:05:01.535(1)? hello from easy:search\r\nI20151124-21:05:01.541(1)? hello from easy:search\r\nI20151124-21:05:01.545(1)? hello from easy:search\r\n```\r\n\r\nI was wondering if that is the default/desired behavior? Why are all these dependencies kept? My hunch would be to `stop()` them, when the template is destroyed, but maybe I'm overlooking something?."},"comment":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/comments/159719887","html_url":"https://github.com/matteodem/meteor-easy-search/issues/375#issuecomment-159719887","issue_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/375","id":159719887,"user":{"login":"matteodem","id":1301147,"avatar_url":"https://avatars.githubusercontent.com/u/1301147?v=3","gravatar_id":"","url":"https://api.github.com/users/matteodem","html_url":"https://github.com/matteodem","followers_url":"https://api.github.com/users/matteodem/followers","following_url":"https://api.github.com/users/matteodem/following{/other_user}","gists_url":"https://api.github.com/users/matteodem/gists{/gist_id}","starred_url":"https://api.github.com/users/matteodem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteodem/subscriptions","organizations_url":"https://api.github.com/users/matteodem/orgs","repos_url":"https://api.github.com/users/matteodem/repos","events_url":"https://api.github.com/users/matteodem/events{/privacy}","received_events_url":"https://api.github.com/users/matteodem/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T20:15:00Z","updated_at":"2015-11-25T20:15:00Z","body":"Fixed in latest version `2.0.5`."}}