當前位置: 首頁>>代碼示例>>Java>>正文


Java StructuredIndex類代碼示例

本文整理匯總了Java中org.galagosearch.core.index.StructuredIndex的典型用法代碼示例。如果您正苦於以下問題:Java StructuredIndex類的具體用法?Java StructuredIndex怎麽用?Java StructuredIndex使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StructuredIndex類屬於org.galagosearch.core.index包,在下文中一共展示了StructuredIndex類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: StructuredRetrieval

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
public StructuredRetrieval(StructuredIndex index, Parameters factoryParameters) {
    this.index = index;
    Parameters featureParameters = factoryParameters.clone();
    featureParameters.add("collectionLength", Long.toString(index.getCollectionLength()));
    featureParameters.add("documentCount", Long.toString(index.getDocumentCount()));
    featureFactory = new FeatureFactory(featureParameters);
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:8,代碼來源:StructuredRetrieval.java

示例2: StatisticsGatherer

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
public StatisticsGatherer(StructuredIndex index, CountIterator iterator, String[] required) {
    this(iterator);

    this.required.addAll(Arrays.asList(required));
    collectionLength = index.getCollectionLength();
    averageDocumentLength = (double) index.getCollectionLength() / (double) index.
            getDocumentCount();
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:9,代碼來源:StatisticsGatherer.java

示例3: handleDumpIndex

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
private static void handleDumpIndex(String[] args) throws IOException {
    if (args.length <= 1) {
        commandHelp(args[0]);
        return;
    }

    StructuredIndexPartReader reader = StructuredIndex.openIndexPart(args[1]);
    IndexIterator iterator = reader.getIterator();
    do {
        System.out.println(iterator.getRecordString());
    } while (iterator.nextRecord());
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:13,代碼來源:App.java

示例4: testTraversal

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
public void testTraversal() throws Exception {
    StructuredIndex index = new StructuredIndex(indexPath.getAbsolutePath());
    StructuredRetrieval retrieval = new StructuredRetrieval(index, new Parameters());
    ImplicitFeatureCastTraversal traversal = new ImplicitFeatureCastTraversal(new Parameters(), retrieval);
    Node tree = StructuredQuery.parse("#combine(cat dog.title)");
    // Just a smoke test for now, verifies that no exceptions are thrown
    //Node result = StructuredQuery.copy(traversal, tree);
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:9,代碼來源:ImplicitFeatureCastTraversalTest.java

示例5: handleDumpIndex

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
private void handleDumpIndex(String[] args) throws IOException {
    if (args.length <= 1) {
        commandHelp(args[0]);
        return;
    }

    StructuredIndexPartReader reader = StructuredIndex.openIndexPart(args[1]);
    IndexIterator iterator = reader.getIterator();
    do {
        output.println(iterator.getRecordString());
    } while (iterator.nextRecord());
}
 
開發者ID:youngilcho,項目名稱:internet-application-2014,代碼行數:13,代碼來源:App.java

示例6: getIndex

import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
public StructuredIndex getIndex() {
    return index;
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:4,代碼來源:StructuredRetrieval.java


注:本文中的org.galagosearch.core.index.StructuredIndex類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。