本文整理汇总了Java中lotus.domino.Database.isFTIndexed方法的典型用法代码示例。如果您正苦于以下问题:Java Database.isFTIndexed方法的具体用法?Java Database.isFTIndexed怎么用?Java Database.isFTIndexed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lotus.domino.Database
的用法示例。
在下文中一共展示了Database.isFTIndexed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import lotus.domino.Database; //导入方法依赖的package包/类
@Override
public void validate(FacesContext context, UIComponent ui, Object value)throws ValidatorException {
try {
Database db = ContextInfo.getUserDatabase();
if(!db.isFTIndexed()){
String errorMsg = "Application is not full text index. Please contact your administrator.";
FacesMessage message = new FacesMessage();
message.setSeverity(FacesMessage.SEVERITY_ERROR);
message.setDetail(errorMsg);
message.setSummary(errorMsg);
throw new ValidatorException(message);
}
} catch (NotesException e) {
logger.log(Level.SEVERE,null,e);
}
}
示例2: createCollection
import lotus.domino.Database; //导入方法依赖的package包/类
@Override
protected ViewEntryCollection createCollection() throws NotesException, ServiceException {
Database db = view.getParent();
if (!db.isFTIndexed()) {
throw new ServiceException(null, "Database is not full text indexed."); // $NON-NLS-1$
}
String search = getParameters().getSearch();
int maxDocs = getParameters().getSearchMaxDocs();
String sortColumn = getParameters().getSortColumn();
// if 'sortColumn' is specified then use FTSearchSorted
// FTSearchSorted call will fail if the DB is not full text indexed
if (StringUtil.isNotEmpty(sortColumn)) {
try {
String sortOrder = getParameters().getSortOrder();
boolean ascending = !StringUtil.equals(sortOrder, SORT_ORDER_DESCENDING);
if (maxDocs < 0)
maxDocs = 0;
boolean exact = getParameters().isKeysExactMatch();
boolean variants = false, fuzzy = false;
view.FTSearchSorted(search, maxDocs, sortColumn, ascending, exact, variants, fuzzy);
} catch(NotesException ex) {
throw new ServiceException(ex, ResponseCode.BAD_REQUEST, ex.getLocalizedMessage());
}
return view.getAllEntries();
}
if(maxDocs<=0) {
view.FTSearch(search);
} else {
view.FTSearch(search,maxDocs);
}
return view.getAllEntries();
}