[opencms-dev] How to limit search to a document set

Andras Balogh abalogh at gmail.com
Wed Jul 13 09:01:33 CEST 2005


Hello David,

    You can customize the search in the file 
WEB-INF/config/opencms-search.xml.
You can configure here multiple indexes and multiple sources.
    After that check the class org.opencms.search.CmsSearch methods:

setIndex(String indexName)
setSearchRoots(String[] searchRoots) 

Best regards,
Andras

ps. open source=sources are available



David wrote:

> Hi,
>  
> I am running OpenCMS 6.0 and trying to experiment with how to limit 
> search to only a specified set of documents in the VFS. I understand 
> that I can use this code in my JSP to perform search feature:
>  
> <jsp:useBean id="search" scope="request" 
> class="org.opencms.search.CmsSearch">
>     <jsp:setProperty name = "search" property="matchesPerPage" 
> param="matchesperpage"/>
>     <jsp:setProperty name = "search" property="displayPages" 
> param="displaypages"/>
>     <jsp:setProperty name = "search" property="*"/>
>     <%
>     search.init(cmsObj);
>     %>
> </jsp:useBean>
>  
> What I would like to do now is to somehow through a parameter or 
> restriction set a list of document files (e.g. 
> (file1.doc,file2.ppt,file3.pdf) etc) from which to search (not the 
> entire index). Can I do this with OpenCMS?
>  
> Thanks very much for your help.
>  
> Rgds,
> David
>
>------------------------------------------------------------------------
>
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list