{"action":"closed","issue":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/441","repository_url":"https://api.github.com/repos/matteodem/meteor-easy-search","labels_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/441/comments","events_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/441/events","html_url":"https://github.com/matteodem/meteor-easy-search/issues/441","id":133715359,"number":441,"title":"Question about search ","user":{"login":"Marcus-Crassus","id":12447113,"avatar_url":"https://avatars.githubusercontent.com/u/12447113?v=3","gravatar_id":"","url":"https://api.github.com/users/Marcus-Crassus","html_url":"https://github.com/Marcus-Crassus","followers_url":"https://api.github.com/users/Marcus-Crassus/followers","following_url":"https://api.github.com/users/Marcus-Crassus/following{/other_user}","gists_url":"https://api.github.com/users/Marcus-Crassus/gists{/gist_id}","starred_url":"https://api.github.com/users/Marcus-Crassus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marcus-Crassus/subscriptions","organizations_url":"https://api.github.com/users/Marcus-Crassus/orgs","repos_url":"https://api.github.com/users/Marcus-Crassus/repos","events_url":"https://api.github.com/users/Marcus-Crassus/events{/privacy}","received_events_url":"https://api.github.com/users/Marcus-Crassus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T13:40:03Z","updated_at":"2016-03-29T13:36:09Z","closed_at":"2016-03-29T13:36:09Z","body":"Hi there!\r\n\r\nHow can I search some 'products' in particular range ? For example, there is db 'Products'. The search [_id, name] is available on the page, but I want to get only the results which have productType: id, where 'id' is available on the client (Router.current().params._type).\r\n\r\nMy aim is:\r\nThe user can search products with [_id, name] on the page, but get only result, where current productType: id is on the page (Router.current().params._type).\r\n\r\n```javascript\r\nDashboardSearchProducts = new EasySearch.Index({\r\n    collection: Products,\r\n    fields: ['name', '_id'],\r\n    defaultSearchOptions: {\r\n        limit: 5\r\n    },\r\n    engine: new EasySearch.MongoDB(),\r\n    permission: (options) => {\r\n        return options.userId;\r\n    }\r\n});\r\n```"}}