<%@ page contentType="text/html; charset=windows-1252" import="com.imcode.imcms.api.*, java.util.*, java.text.SimpleDateFormat, java.text.DateFormat, org.apache.commons.lang.StringUtils" errorPage="error.jsp" %><% ContentManagementSystem imcmsSystem = ContentManagementSystem.fromRequest( request ); DocumentService documentService = imcmsSystem.getDocumentService() ; SearchQuery query ; %> Search Documents

Search for documents

See syntax at http://jakarta.apache.org/lucene/docs/queryparsersyntax.html

Search for documents containing "test" in headline, menutext, textfields, or keywords, sorted in order of best hit.

<% int sectionId = 1; Section section = documentService.getSection( sectionId ); if (null != section) { %>

Search for documents in section "<%= section.getName() %>", sorted by headline and id.

<% } %>

Search for documents containing "test" in textfield 1, and modified between 2004-01-01 and 2005-01-01, sorted by modified time, newest first.

<% CategoryType[] categoryTypes = documentService.getAllCategoryTypes() ; if (0 != categoryTypes.length) { Category[] categories = documentService.getAllCategoriesOfType( categoryTypes[0] ) ; if (0 != categories.length) { Category category = categories[0] ; %>

Search for documents in category <%= category.getName() %> (category-id <%= category.getId() %>), sorted by published time.

Search for documents linked from menu 1 in document 1001, sorted by headline and archived date, later archived first.

Search for new documents that are overdue for publication approval (publication start date), sorted with oldest publication start date first.