本文整理汇总了Java中org.apache.lucene.document.FieldSelectorResult.LOAD属性的典型用法代码示例。如果您正苦于以下问题:Java FieldSelectorResult.LOAD属性的具体用法?Java FieldSelectorResult.LOAD怎么用?Java FieldSelectorResult.LOAD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.lucene.document.FieldSelectorResult
的用法示例。
在下文中一共展示了FieldSelectorResult.LOAD属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: accept
@Override
public FieldSelectorResult accept(String fieldName) {
for (Term t : terms) {
if (fieldName == t.field()) {
return FieldSelectorResult.LOAD;
}
}
return FieldSelectorResult.NO_LOAD;
}
示例2: accept
public FieldSelectorResult accept(String fieldName)
{
if (fieldName.equals(field))
{
return FieldSelectorResult.LOAD;
}
else
{
return FieldSelectorResult.NO_LOAD;
}
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:11,代码来源:ReferenceCountingReadOnlyIndexReaderFactory.java
示例3: accept
public FieldSelectorResult accept(String fieldName) {
if (fieldName.equals("type") || fieldName.equals("fullPath")) {
return FieldSelectorResult.LOAD;
}
return FieldSelectorResult.LAZY_LOAD;
}
示例4: accept
public FieldSelectorResult accept(String fieldName) {
if (fieldName.equals("fullPath")) {
return FieldSelectorResult.LOAD;
}
return FieldSelectorResult.LAZY_LOAD;
}
示例5: initResultList
private List<ResultDocument> initResultList(final Identity identity, final Roles roles, final Query query, final Analyzer analyzer, final Searcher searcher,
final TopDocs docs, final int firstResult, final int maxReturns, final boolean doHighlight) throws IOException {
final FieldSelector selector = new FieldSelector() {
@Override
public FieldSelectorResult accept(final String fieldName) {
return (doHighlight || !AbstractOlatDocument.CONTENT_FIELD_NAME.equals(fieldName)) ? FieldSelectorResult.LOAD : FieldSelectorResult.NO_LOAD;
}
};
maxHits = SearchServiceFactory.getService().getSearchModuleConfig().getMaxHits();
totalHits = docs.totalHits;
totalDocs = (docs.scoreDocs == null ? 0 : docs.scoreDocs.length);
final int numOfDocs = Math.min(maxHits, docs.totalHits);
final List<ResultDocument> res = new ArrayList<ResultDocument>(maxReturns + 1);
for (int i = firstResult; i < numOfDocs && res.size() < maxReturns; i++) {
final Document doc = searcher.doc(docs.scoreDocs[i].doc, selector);
final String reservedTo = doc.get(AbstractOlatDocument.RESERVED_TO);
if (StringHelper.containsNonWhitespace(reservedTo) && !"public".equals(reservedTo) && !reservedTo.contains(identity.getKey().toString())) {
continue;// admin cannot see private documents
}
final ResultDocument rDoc = createResultDocument(doc, i, query, analyzer, doHighlight, identity, roles);
if (rDoc != null) {
res.add(rDoc);
}
if (!roles.isOLATAdmin() && i % 10 == 0) {
// Do commit after certain number of documents because the transaction should not be too big
DBFactory.getInstance().intermediateCommit();
}
}
return res;
}
示例6: AbstractRevisionFilter
public AbstractRevisionFilter(final IssueManager issueManager, final PermissionManager permissionManager, final User user) {
this.issueManager = issueManager;
this.permissionManager = permissionManager;
this.user = user;
issueKeysFieldSelector = new FieldSelector() {
public FieldSelectorResult accept(String s) {
return StringUtils.equals(s, CommitIndexer.FIELD_ISSUEKEY)
? FieldSelectorResult.LOAD
: FieldSelectorResult.NO_LOAD;
}
};
}
示例7: accept
@Override
public FieldSelectorResult accept(final String fieldName) {
return FieldSelectorResult.LOAD;
}
示例8: accept
@Override
public FieldSelectorResult accept(String fieldName) {
return fieldSet.contains(fieldName) ? FieldSelectorResult.LOAD
: FieldSelectorResult.NO_LOAD;
}
示例9: accept
@Override
public FieldSelectorResult accept(String fieldName) {
if (this.name.equals(fieldName))
return FieldSelectorResult.LOAD;
return FieldSelectorResult.NO_LOAD;
}