[opencms-dev] CmsSearch - search for all words, any of the word, exact phrase, exclude words

Kesarkar, Dipak dipak.kesarkar at capgemini.com
Sun Mar 8 13:34:19 CET 2009


Hi,

 

I am using setQuery method of the CmsSearch class for simple searches.

 

            CmsSearch cmsSearch = new CmsSearch();

 
cmsSearch.init(CmsObjectLoader.getInstance().getCmsObject());

            cmsSearch.setIndex(this.searchIndex);

            cmsSearch.setField(this.searchFields);

            cmsSearch.setSearchPage(0); //To get all the search results

 

            cmsSearch.setQuery(searchKey)

            List<CmsSearchResult> currentSearchResults =
cmsSearch.getSearchResult();

 

 

 

I need to have advanced search facilities like search for all words, any
of the word, exact phrase, exclude words

 

 

How can I use CmsSearch for such advance searches?

Is there any other way?

 

 

 

Regards,

Dipak

 

</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</p><PRE>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090308/1490220f/attachment.htm>


More information about the opencms-dev mailing list