How do I restrict a search to only certain subdirectories or documents?
That depends on whether you want to protect certain parts of your site from prying eyes, or just limit the scope of search results to certain relevant areas. For the latter, you just need to set the restrict or exclude input parameter in the search form. This can be done using hidden input fields containing preset values, text input fields, select lists, radio buttons or checkboxes, as you see fit. If you use select lists, you can propagate the choices to select lists in the follow-up search forms using the build_select_lists configuration attribute. If you wish to keep secure and non-secure areas on your site separate, and avoid having unauthorized users seeing documents from secure areas in their search results, that takes a bit more effort. You certainly can’t rely on the restrict and exclude parameters, or even the config parameter, as any parameter in a search form can also be overridden by the user in a URL with CGI parameters. The safest option would be to host the secure and no
Related Questions
- How will a user be able to access the document on a certain subject by any field and be able to search those that have documents?"
- How do I restrict my search to structures which contain a certain substructure and show some anti-viral anti-AIDS activity?
- How do I restrict a search to only certain subdirectories or documents?