Programmatically add filters for single search interface
I'm using Coveo to index multiple sources (database, web, etc.) in an MVC site using the JS API. My init call is on thetag in my shared _layout.chtml. However, I have a single page in my site where I want to limit the source of my results to a single source. Given that my .init call is at the "master" level body tag, how do I inject a filter programmatically for just that limited search page so that it doesn't interfere with the overall global search / search results page?
In your master layout, you could:
- Define your options variable on a line.
- Do the init call on the third line with the options variable.