当前位置: 首页>>代码示例>>Java>>正文


Java FieldSelectorResult.LOAD属性代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:Queries.java

示例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;
}
 
开发者ID:drftpd-ng,项目名称:drftpd3,代码行数:7,代码来源:AdvancedSearchFieldSelector.java

示例4: accept

public FieldSelectorResult accept(String fieldName) {
	if (fieldName.equals("fullPath")) {
		return FieldSelectorResult.LOAD;
	}
	
	return FieldSelectorResult.LAZY_LOAD;
}
 
开发者ID:drftpd-ng,项目名称:drftpd3,代码行数:7,代码来源:SimpleSearchFieldSelector.java

示例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;
}
 
开发者ID:huihoo,项目名称:olat,代码行数:33,代码来源:SearchResultsImpl.java

示例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;
        }
    };
}
 
开发者ID:astralbat,项目名称:gitcommitviewer,代码行数:13,代码来源:AbstractRevisionFilter.java

示例7: accept

@Override
public FieldSelectorResult accept(final String fieldName) {
    return FieldSelectorResult.LOAD;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:AllFieldsSelector.java

示例8: accept

@Override
public FieldSelectorResult accept(String fieldName) {
	return fieldSet.contains(fieldName) ? FieldSelectorResult.LOAD
			: FieldSelectorResult.NO_LOAD;
}
 
开发者ID:jaeksoft,项目名称:opensearchserver,代码行数:5,代码来源:FieldSelectors.java

示例9: accept

@Override
public FieldSelectorResult accept(String fieldName) {
	if (this.name.equals(fieldName))
		return FieldSelectorResult.LOAD;
	return FieldSelectorResult.NO_LOAD;
}
 
开发者ID:jaeksoft,项目名称:opensearchserver,代码行数:6,代码来源:AbstractField.java


注:本文中的org.apache.lucene.document.FieldSelectorResult.LOAD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。