Package it.unimi.dsi.util

Examples of it.unimi.dsi.util.Properties.addAll()


      indexWriter.close();
      final Properties properties = indexWriter.properties();
      additionalProperties.setProperty( Index.PropertyKeys.SIZE, indexSize );
      additionalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, maxDocSize );
      additionalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, numberOfOccurrences );
      properties.addAll( additionalProperties );
      logger.debug( "Post-merge properties: " + new ConfigurationMap( properties ) );
      properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
    }
       
    final PrintStream stats = new PrintStream( new FileOutputStream ( outputBasename + DiskBasedIndex.STATS_EXTENSION ) );
View Full Code Here


    properties.setProperty( Index.PropertyKeys.TERMPROCESSOR, termProcessor.getClass().getName() );

    if ( ! indexingIsVirtual ) {
      // This set of batches can be seen as a documental cluster index.
      final Properties clusterProperties = new Properties();
      clusterProperties.addAll( properties );
      clusterProperties.setProperty( Index.PropertyKeys.TERMS, -1 );
      clusterProperties.setProperty( DocumentalCluster.PropertyKeys.BLOOM, false );
      clusterProperties.setProperty( IndexCluster.PropertyKeys.FLAT, false );

      if ( indexingIsStandard ) {
View Full Code Here

      properties.setProperty( Index.PropertyKeys.TERMPROCESSOR, NullTermProcessor.class.getName() );
      properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );

      // This set of batches can be seen as a documental cluster index.
      final Properties clusterProperties = new Properties();
      clusterProperties.addAll( properties );
      clusterProperties.setProperty( Index.PropertyKeys.TERMS, 1 );
      clusterProperties.setProperty( IndexCluster.PropertyKeys.BLOOM, false );
      clusterProperties.setProperty( IndexCluster.PropertyKeys.FLAT, true );

      if ( indexingType == IndexingType.STANDARD ) {
View Full Code Here

      final OutputStream output = new FileOutputStream( localBasename[ i ] + DiskBasedIndex.SIZES_EXTENSION );
      IOUtils.copy( input, output );
      input.close();
      output.close();
      Properties localProperties = new Properties();
      localProperties.addAll( globalProperties );
      localProperties.setProperty( Index.PropertyKeys.TERMS, numTerms[ i ] );
      localProperties.setProperty( Index.PropertyKeys.OCCURRENCES, numberOfOccurrences[ i ] );
      localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] );
      localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] );
      localProperties.setProperty( Index.PropertyKeys.INDEXCLASS, properties.getProperty( Index.PropertyKeys.INDEXCLASS ) );
View Full Code Here

      localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] );
      localProperties.setProperty( Index.PropertyKeys.INDEXCLASS, properties.getProperty( Index.PropertyKeys.INDEXCLASS ) );
      localProperties.addProperties( Index.PropertyKeys.CODING, properties.getStringArray( Index.PropertyKeys.CODING ) );
      localProperties.setProperty( BitStreamIndex.PropertyKeys.SKIPQUANTUM, properties.getProperty( BitStreamIndex.PropertyKeys.SKIPQUANTUM ) );
      localProperties.setProperty( BitStreamIndex.PropertyKeys.SKIPHEIGHT, properties.getProperty( BitStreamIndex.PropertyKeys.SKIPHEIGHT ) );
      if ( strategyProperties[ i ] != null ) localProperties.addAll( strategyProperties[ i ] );
      localProperties.save( localBasename[ i ] + DiskBasedIndex.PROPERTIES_EXTENSION );
      LOGGER.debug( "Post-partitioning properties for index " + localBasename[ i ] + ": " + new ConfigurationMap( localProperties ) );
    }
  }
View Full Code Here

      if ( bloomFilterPrecision != 0 ) BinIO.storeObject( bloomFilter[ i ], localBasename[ i ] + DocumentalCluster.BLOOM_EXTENSION );
      temp[ i ].close();
      tempFile[ i ].delete();
     
      Properties localProperties = indexWriter[ i ].properties();
      localProperties.addAll( globalProperties );
      localProperties.setProperty( Index.PropertyKeys.MAXCOUNT, String.valueOf( maxDocPos[ i ] ) );
      localProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, maxDocSize[ i ] );
      localProperties.setProperty( Index.PropertyKeys.FIELD, globalProperties.getProperty( Index.PropertyKeys.FIELD ) );
      localProperties.setProperty( Index.PropertyKeys.OCCURRENCES, haveCounts ? numOccurrences[ i ] : -1 );
      localProperties.setProperty( Index.PropertyKeys.POSTINGS, numPostings[ i ] );
View Full Code Here

      localProperties.setProperty( Index.PropertyKeys.FIELD, globalProperties.getProperty( Index.PropertyKeys.FIELD ) );
      localProperties.setProperty( Index.PropertyKeys.OCCURRENCES, haveCounts ? numOccurrences[ i ] : -1 );
      localProperties.setProperty( Index.PropertyKeys.POSTINGS, numPostings[ i ] );
      localProperties.setProperty( Index.PropertyKeys.TERMS, numTerms[ i ] );
      if ( havePayloads ) localProperties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );
      if ( strategyProperties[ i ] != null ) localProperties.addAll( strategyProperties[ i ] );
      localProperties.save( localBasename[ i ] + DiskBasedIndex.PROPERTIES_EXTENSION );
    }

    if ( strategyFilename != null ) globalProperties.setProperty( IndexCluster.PropertyKeys.STRATEGY, strategyFilename );
    for( int i = 0; i < numIndices; i++ ) globalProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, localBasename[ i ] );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.