2013-12-10 2 views
0

Oracle UCM에서 collectionId를 사용하여 전체 텍스트 검색을 수행하려면 어떻게해야합니까? collectionId 매개 변수로 재귀 적으로 시작하는 전체 텍스트 검색을 할 수 있습니까? 나는 몇 가지 시도를했는데 (아래에서 살펴볼 수있다.), collectionId로 테스트 한 결과가 없다.Oracle UCM에서 collectionId로 전체 텍스트 검색을 수행하는 방법은 무엇입니까?

public List<UCMDocumentTemplate> fullTextSearchByFolderId(@WebParam(name = "searchCriteria") 
    String paramSearchCriteria, @WebParam(name = "ucmFolderId") 
    Long ucmFolderId) throws UCMDocumentSearchException 
{ 
    List<UCMDocumentTemplate> documentTemplateList = new ArrayList<UCMDocumentTemplate>(); 
    String documentSearchCriteria = ""; 
    try 
    { 
     if (ucmFolderId != null) 
      documentSearchCriteria = "xCollectionID <= <qsch>" + ucmFolderId + "</qsch> <AND>"; 
     documentSearchCriteria += "dDocFullText <substring> <qsch>" + paramSearchCriteria + "</qsch>"; 
     List<Properties> childDocumentList = UCM_API.fullTextSearch(documentSearchCriteria); 
     UCMDocumentTemplate ucmDocumentTemplate = null; 
     if (childDocumentList != null) 
      for (Properties properties : childDocumentList) 
      { 
       ucmDocumentTemplate = transformToUCMDocumentTemplate(new UCMDocumentTemplate(), properties); 
       documentTemplateList.add(ucmDocumentTemplate); 
      } 
    } 
    catch (Exception e) 
    { 
     UCMDocumentSearchException exc = new UCMDocumentSearchException(documentSearchCriteria, e); 
     System.err.println(exc.getCompleteCode()); 
     e.printStackTrace(); 
     throw exc; 
    } 
    return documentTemplateList; 
} 

public static List<Properties> fullTextSearch(String searchCriteria) throws Exception 
{ 
List<Properties> resultList = null; 
List<Field> fields = null; 
Properties responseProperties = null; 

Properties inputBinderProperties = new Properties(); 
inputBinderProperties.put("IdcService", "GET_SEARCH_RESULTS"); 
inputBinderProperties.put("QueryText", searchCriteria); 
inputBinderProperties.put("SearchEngineName", "databasefulltext"); 
inputBinderProperties.put("ResultCount", "500"); 

DataBinder responseBinder = getExecutedResponseBinder(userName, inputBinderProperties); 
DataResultSet resultSet = responseBinder.getResultSet("SearchResults"); 

fields = resultSet.getFields(); 
resultList = new ArrayList<Properties>(); 
for (DataObject dataObject : resultSet.getRows()) 
{ 
    responseProperties = new Properties(); 
    for (Field field : fields) 
    { 
     if (field.getType() == Field.Type.DATE && dataObject.getDate(field.getName()) != null) 
      responseProperties.put(field.getName(), dataObject.getDate(field.getName())); 
     else 
      responseProperties.put(field.getName(), dataObject.get(field.getName())); 
    } 
    resultList.add(responseProperties); 
} 

return resultList; 

}

답변

0

나는 해결책을 발견 하였다. inputBinderProperties에 매개 변수를 추가 할 때 올바르게 작동합니다.

inputBinderProperties.put("folderChildren", ucmFolderId);