本文整理匯總了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);
}
示例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();
}
示例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());
}
示例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);
}
示例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());
}
示例6: getIndex
import org.galagosearch.core.index.StructuredIndex; //導入依賴的package包/類
public StructuredIndex getIndex() {
return index;
}