Package org.terrier.structures.merging

Examples of org.terrier.structures.merging.StructureMerger


    * @param index1 Path/Prefix of source index 1
    * @param index2 Path/Prefix of source index 2
    * @param outputIndex Path/Prefix of destination index
    */
  protected static void mergeTwoIndices(String[] index1, String[] index2, String[] outputIndex){
    StructureMerger sMerger = null;
    Index src1 = Index.createIndex(index1[0], index1[1]);
    Index src2 = Index.createIndex(index2[0], index2[1]);
    Index dst = Index.createNewIndex(outputIndex[0], outputIndex[1]);
  //  //logger.info("Merging "+ src1+ " & "+ src2 +" to " + dst);
    if (ApplicationSetup.BLOCK_INDEXING)
      sMerger = new BlockStructureMerger(src1, src2, dst);
    else
      sMerger = new StructureMerger(src1, src2, dst);
                     
    //sMerger.setNumberOfBits(FieldScore.FIELDS_COUNT);
    sMerger.mergeStructures();
    try{
      src1.close(); src2.close(); dst.close();
    } catch (IOException ioe) {
  //    logger.error("Problem flushing index dst", ioe);
    }
View Full Code Here


    @Override
    protected void finishIndexing() throws Exception {
      Index i1 = Index.createIndex(ApplicationSetup.TERRIER_INDEX_PATH, ApplicationSetup.TERRIER_INDEX_PREFIX + "-0");
      Index i2 = Index.createIndex(ApplicationSetup.TERRIER_INDEX_PATH, ApplicationSetup.TERRIER_INDEX_PREFIX + "-0");
      Index dest = Index.createNewIndex(ApplicationSetup.TERRIER_INDEX_PATH, ApplicationSetup.TERRIER_INDEX_PREFIX);
      new StructureMerger(i1, i2, dest).mergeStructures();
    }   
View Full Code Here

TOP

Related Classes of org.terrier.structures.merging.StructureMerger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.