class CrescentSearchRequestWrapper {

	public List<CrescentCollectionField> getTargetSearchFields() {
		
		if(searchFields.size() > 0) {
			return searchFields;
		}
		
		if(searchRequest.getSearchField() != null && !"".equals(searchRequest.getSearchField())) { 
			String[] requestSearchField = searchRequest.getSearchField().split(",");
			for(String fieldName : requestSearchField) {
				CrescentCollectionField field = collectionFieldsMap.get(fieldName);
				if(field == null) {
					throw new IllegalStateException("There is no Field in Collection [" + searchRequest.getCollectionName() + "] [" + fieldName + "]");
				}
				
				searchFields.add(collectionFieldsMap.get(fieldName));
			}
			
		} else {//검색 대상 필드가 지정되어 있지 않으면..
			for(CrescentDefaultSearchField f : collection.getDefaultSearchFields()) {
				searchFields.add(collectionFieldsMap.get(f.getName()));
			}
		}
		
		return searchFields;
	}

	public  CrescentSearchRequestWrapper(SearchRequest searchRequest);

}