[opencms-dev] How to limit search to a document set
    Andras Balogh 
    abalogh at gmail.com
       
    Wed Jul 13 10:42:26 CEST 2005
    
    
  
Hello David,
David wrote:
> Hi Andras,
>  
> Thanks very much for your prompt response.
>  
> ....
>  
> Here I am only indexing on files stored in /sites/myapp/content folder 
> of myapp application. The indexing works fine and I can do searches on 
> this entire index source. What I am trying to achieve next is to 
> further limit the scope of my search to only a selected list of files 
> (given the file names) in this folder. Would the method 
> setSearchRoots() solve this? Does the parameter searchRoots of this 
> method mean an array of file names?
>  
> Can you elaborate a bit more from your suggestion? Thanks.
I can't elaborate more than the javadoc says:
    /**
     * Sets the search root list.<p>
     * 
     * Only resources that are sub-resources of one of the search roots
     * are included in the search result.<p>
     * 
     * The search roots set here are used <i>in addition to</i> the current site root
     * of the user performing the search.<p>
     * 
     * By default, the search roots contain only one entry with an empty string.<p>
     *
     * @param searchRoots the search roots to set
     */
>  
> Rgds,
> David.
>  
Best regards,
Andras.
ps. I'm keeping under my pillow a printed version of javadoc and the 
sources of opencms, you should do the same (joking :))
    
    
More information about the opencms-dev
mailing list