private void writeObject( final ObjectOutputStream s ) throws IOException { s.defaultWriteObject(); try { save( s ); } catch ( ConfigurationException e ) { throw new RuntimeException( e ); } }
private void writeObject( final ObjectOutputStream s ) throws IOException { s.defaultWriteObject(); try { save( s ); } catch ( ConfigurationException e ) { throw new RuntimeException( e ); } }
private void writeObject(final ObjectOutputStream s) throws IOException { s.defaultWriteObject(); try { save(s); } catch (ConfigurationException e) { throw new RuntimeException(e); } }
public static void saveProperties( IOFactory ioFactory, Properties properties, String filename ) throws ConfigurationException, IOException { final OutputStream propertiesOutputStream = ioFactory.getOutputStream( filename ); properties.save( propertiesOutputStream ); propertiesOutputStream.close(); }
public static void saveProperties( IOFactory ioFactory, Properties properties, String filename ) throws ConfigurationException, IOException { final OutputStream propertiesOutputStream = ioFactory.getOutputStream( filename ); properties.save( propertiesOutputStream ); propertiesOutputStream.close(); }
indexProps.save(); } else { throw new IOException("Could not rename old properties file (" +
Properties properties = indexWriter.properties(); properties.addProperty( Index.PropertyKeys.TERMPROCESSOR, ObjectParser.toSpec( alignerIndex.termProcessor ) ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); frequencies.close();
properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); new FileOutputStream( batchBasename + DiskBasedIndex.TERMS_EXTENSION ).close(); batch = 1; for ( int i = 0; i < batch; i++ ) clusterProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, batchBasename( i, basename, batchDir ) ); clusterProperties.save( basename + CLUSTER_PROPERTIES_EXTENSION ); properties.save( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); new FileOutputStream( batchBasename + DiskBasedIndex.TERMS_EXTENSION ).close(); batch = 1; for ( int i = 0; i < batch; i++ ) clusterProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, batchBasename( i, basename, batchDir ) ); clusterProperties.save( basename + CLUSTER_PROPERTIES_EXTENSION ); properties.save( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
Properties properties = indexWriter.properties(); properties.addProperty( Index.PropertyKeys.TERMPROCESSOR, ObjectParser.toSpec( alignerIndex.termProcessor ) ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); frequencies.close();
properties.setProperty( Index.PropertyKeys.SIZE, 0 ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); batch = 1; for ( int i = 0; i < batch; i++ ) clusterProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, batchBasename( i, basename, batchDir ) ); clusterProperties.save( new File( batchDir, basename ) + CLUSTER_PROPERTIES_EXTENSION ); properties.save( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
if ( hasPositions ) properties.addProperty( Index.PropertyKeys.OCCURRENCES, totOccurrencies ); if ( fieldName != null || mainIndex.field != null ) properties.addProperty( Index.PropertyKeys.FIELD, fieldName != null ? fieldName: mainIndex.field ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
if ( hasPositions ) properties.addProperty( Index.PropertyKeys.OCCURRENCES, totOccurrencies ); if ( fieldName != null || mainIndex.field != null ) properties.addProperty( Index.PropertyKeys.FIELD, fieldName != null ? fieldName: mainIndex.field ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.addAll( additionalProperties ); logger.debug( "Post-merge properties: " + new ConfigurationMap( properties ) ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.addAll( additionalProperties ); logger.debug( "Post-merge properties: " + new ConfigurationMap( properties ) ); properties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION );
properties.setProperty( Index.PropertyKeys.SIZE, 0 ); if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field ); properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); batch = 1; for ( int i = 0; i < batch; i++ ) clusterProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, batchBasename( i, basename, batchDir ) ); clusterProperties.save( basename + CLUSTER_PROPERTIES_EXTENSION ); properties.save( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
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 ); DocumentalMergedCluster.class.getName() ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) );
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 ); DocumentalMergedCluster.class.getName() ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) );