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


Java IndexReaderSplitParser类代码示例

本文整理汇总了Java中org.galagosearch.core.parse.IndexReaderSplitParser的典型用法代码示例。如果您正苦于以下问题:Java IndexReaderSplitParser类的具体用法?Java IndexReaderSplitParser怎么用?Java IndexReaderSplitParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IndexReaderSplitParser类属于org.galagosearch.core.parse包,在下文中一共展示了IndexReaderSplitParser类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testNextDocument

import org.galagosearch.core.parse.IndexReaderSplitParser; //导入依赖的package包/类
/**
 * Test of nextDocument method, of class IndexReaderSplitParser.
 */
public void testNextDocument() throws Exception {
    buildIndex();
    
    DocumentSplit split = new DocumentSplit();
    split.fileName = temporaryName;
    split.fileType = "corpus";
    split.startKey = new byte[0];
    split.endKey = new byte[0];
    
    // Open up the file:
    IndexReaderSplitParser parser = new IndexReaderSplitParser(split);
    
    // Check the document:
    Document actual = parser.nextDocument();
    assertNotNull(actual);
    assertEquals(document.identifier, actual.identifier);
    assertEquals(document.text, actual.text);
    assertEquals(2, actual.metadata.size());
    assertNotNull(document.metadata.get("Key"));
    assertNotNull(document.metadata.get("Something"));
    assertEquals("Value", document.metadata.get("Key"));
    assertEquals("Else", document.metadata.get("Something"));
    
    // Make sure there aren't any left:
    assertNull(parser.nextDocument());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:30,代码来源:IndexReaderSplitParserTest.java

示例2: testStartKey

import org.galagosearch.core.parse.IndexReaderSplitParser; //导入依赖的package包/类
public void testStartKey() throws FileNotFoundException, IOException {
    buildIndex();
          
    DocumentSplit split = new DocumentSplit();
    split.fileName = temporaryName;
    split.fileType = "corpus";
    split.startKey = new byte[] { (byte) 'z' };
    split.endKey = new byte[0];
    
    // Open up the file:
    IndexReaderSplitParser parser = new IndexReaderSplitParser(split);
    assertNull(parser.nextDocument());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:IndexReaderSplitParserTest.java

示例3: testEndKey

import org.galagosearch.core.parse.IndexReaderSplitParser; //导入依赖的package包/类
public void testEndKey() throws FileNotFoundException, IOException {
    buildIndex();
          
    DocumentSplit split = new DocumentSplit();
    split.fileName = temporaryName;
    split.fileType = "corpus";
    split.startKey = new byte[0];
    split.endKey = new byte[] { (byte) 'a' };
    
    // Open up the file:
    IndexReaderSplitParser parser = new IndexReaderSplitParser(split);
    assertNull(parser.nextDocument());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:IndexReaderSplitParserTest.java


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