Skip to Content
0
Former Member
Aug 02, 2007 at 02:21 PM

Search Component Implementation - Folder selection

9 Views

Hello all,

I am programming my own SearchComponent, and it's working quite fine.

My only problem is the folder selection.

In the searchOptionSet of the search iView using my component, I have set

Enable Search Scope Selection: false

Default Search Scope: FOLDER

Root Folders for Search (Scope = FOLDER) (csv):

Then, in my code, I have in my method getSearchParamsMap()

public SearchParamsMap getSearchParamsMap() 
{
	this.readUserInput();
	SearchParamsMap m = new SearchParamsMap();
	try 
	{
		IQueryEntryList list = this.createQuery();
		m.put(SearchParamConst.PARAM_SEARCH_QUERY_ENTRIES, list);
		m.put(SearchParamConst.PARAM_SEARCH_IN,"SEARCH_FROM_FOLDER");
		m.put(SearchParamConst.PARAM_SEARCH_FOLDER,"/documents/myfolder");	
	} 
	catch (WcmException e) 
	{
		e.printStackTrace();
	}		
	return m;
}

But the options I set seems to not be taken in account, since when I launch the search, it got the message : "No search folder has been specified."

I also tried to set these options in a HashMap, and use this HashMap to initialize a SearchQueryBuilder etc., but I obtain the same results.

I really can't figure it out, because other parameters like search terms are correctly taken in account.

Any help is welcome and rewarded.

Thanks in advance.

Best regards,

Julien.