public Object getProperty( final Enum<?> key ) { return getProperty( key.name().toLowerCase() ); }
public Object getProperty(final Enum<?> key) { return getProperty(key.name().toLowerCase()); }
public Object getProperty( final Enum<?> key ) { return getProperty( key.name().toLowerCase() ); }
protected static TermProcessor getTermProcessor( final Properties properties ) { try { // Catch old property files if ( properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) == null ) throw new IllegalArgumentException( "No term processor has been specified (most likely, because of an obsolete property file)" ); return ObjectParser.fromSpec( properties.getString( Index.PropertyKeys.TERMPROCESSOR ).replace( ".dsi.", ".di." ), TermProcessor.class, MG4JClassParser.PACKAGE, new String[] { "getInstance" } ); } catch ( Exception e ) { throw new RuntimeException( e ); } }
protected static TermProcessor getTermProcessor( final Properties properties ) { try { // Catch old property files if ( properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) == null ) throw new IllegalArgumentException( "No term processor has been specified (most likely, because of an obsolete property file)" ); return ObjectParser.fromSpec( properties.getString( Index.PropertyKeys.TERMPROCESSOR ).replace( ".dsi.big.mg4j.", ".di.big.mg4j." ), TermProcessor.class, MG4JClassParser.PACKAGE, new String[] { "getInstance" } ); } catch ( Exception e ) { throw new RuntimeException( e ); } }
protected static TermProcessor getTermProcessor( final Properties properties ) { try { // Catch old property files if ( properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) == null ) throw new IllegalArgumentException( "No term processor has been specified (most likely, because of an obsolete property file)" ); return ObjectParser.fromSpec( properties.getString( Index.PropertyKeys.TERMPROCESSOR ), TermProcessor.class, MG4JClassParser.PACKAGE, new String[] { "getInstance" } ); } catch ( Exception e ) { throw new RuntimeException( e ); } }
protected static TermProcessor getTermProcessor( final Properties properties ) { try { // Catch old property files if ( properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) == null ) throw new IllegalArgumentException( "No term processor has been specified (most likely, because of an obsolete property file)" ); return ObjectParser.fromSpec( properties.getString( Index.PropertyKeys.TERMPROCESSOR ), TermProcessor.class, MG4JClassParser.PACKAGE, new String[] { "getInstance" } ); } catch ( Exception e ) { throw new RuntimeException( e ); } }
while(keysIter.hasNext()) { String key = keysIter.next(); Object value = indexProps.getProperty(key); if(value instanceof String && ((String)value).indexOf(OLDPKG) >= 0) { newVals.put(key, ((String)value).replace(OLDPKG, NEWPKG));
globalProperties.setProperty( Index.PropertyKeys.INDEXCLASS, LexicalCluster.class.getName() ); for( int i = 0; i < numIndices; i++ ) globalProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, localBasename[ i ] ); globalProperties.setProperty( Index.PropertyKeys.FIELD, properties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, properties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, properties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, properties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, properties.getProperty( Index.PropertyKeys.TERMS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, properties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, properties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); 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 );
globalProperties.setProperty( Index.PropertyKeys.INDEXCLASS, LexicalCluster.class.getName() ); for( int i = 0; i < numIndices; i++ ) globalProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, localBasename[ i ] ); globalProperties.setProperty( Index.PropertyKeys.FIELD, properties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, properties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, properties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, properties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, properties.getProperty( Index.PropertyKeys.TERMS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, properties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, properties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); 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 );
stashedProps.getProperty(Index.PropertyKeys.TERMPROCESSOR)); newProps.setProperty(Index.PropertyKeys.SIZE, writtenBits);
stashedProps.getProperty(Index.PropertyKeys.TERMPROCESSOR)); newProps.setProperty(Index.PropertyKeys.SIZE, writtenBits);
globalProperties.setProperty( Index.PropertyKeys.INDEXCLASS, LexicalCluster.class.getName() ); for( int i = 0; i < numIndices; i++ ) globalProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, localBasename[ i ] ); globalProperties.setProperty( Index.PropertyKeys.FIELD, properties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, properties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, properties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, properties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, properties.getProperty( Index.PropertyKeys.TERMS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, properties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, properties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); localProperties.setProperty( Index.PropertyKeys.INDEXCLASS, properties.getProperty( Index.PropertyKeys.INDEXCLASS ) ); localProperties.setProperty( QuasiSuccinctIndex.PropertyKeys.BYTEORDER, properties.getProperty( QuasiSuccinctIndex.PropertyKeys.BYTEORDER ) ); 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 != null && strategyProperties[ i ] != null ) localProperties.addAll( strategyProperties[ i ] ); localProperties.save( localBasename[ i ] + DiskBasedIndex.PROPERTIES_EXTENSION );
globalProperties.setProperty( Index.PropertyKeys.INDEXCLASS, LexicalCluster.class.getName() ); for( int i = 0; i < numIndices; i++ ) globalProperties.addProperty( IndexCluster.PropertyKeys.LOCALINDEX, localBasename[ i ] ); globalProperties.setProperty( Index.PropertyKeys.FIELD, properties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, properties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, properties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, properties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, properties.getProperty( Index.PropertyKeys.TERMS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, properties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, properties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, properties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.save( outputBasename + DiskBasedIndex.PROPERTIES_EXTENSION ); LOGGER.debug( "Properties for clustered index " + outputBasename + ": " + new ConfigurationMap( globalProperties ) ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); localProperties.setProperty( Index.PropertyKeys.POSTINGS, numberOfPostings[ i ] ); localProperties.setProperty( Index.PropertyKeys.INDEXCLASS, properties.getProperty( Index.PropertyKeys.INDEXCLASS ) ); localProperties.setProperty( QuasiSuccinctIndex.PropertyKeys.BYTEORDER, properties.getProperty( QuasiSuccinctIndex.PropertyKeys.BYTEORDER ) ); 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 != null && strategyProperties[ i ] != null ) localProperties.addAll( strategyProperties[ i ] ); localProperties.save( localBasename[ i ] + DiskBasedIndex.PROPERTIES_EXTENSION );
globalProperties.setProperty( Index.PropertyKeys.FIELD, inputProperties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, inputProperties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); 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 ] ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, inputProperties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, inputProperties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, inputProperties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, inputProperties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, inputProperties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, inputProperties.getProperty( Index.PropertyKeys.TERMS ) ); if ( havePayloads ) globalProperties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );
globalProperties.setProperty( Index.PropertyKeys.FIELD, inputProperties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, inputProperties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); 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 ] ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, inputProperties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, inputProperties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, inputProperties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, inputProperties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, inputProperties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, inputProperties.getProperty( Index.PropertyKeys.TERMS ) ); if ( havePayloads ) globalProperties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );
globalProperties.setProperty( Index.PropertyKeys.FIELD, inputProperties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, inputProperties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); 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 ] ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, inputProperties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, inputProperties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, inputProperties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, inputProperties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, inputProperties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, inputProperties.getProperty( Index.PropertyKeys.TERMS ) ); if ( havePayloads ) globalProperties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );
globalProperties.setProperty( Index.PropertyKeys.FIELD, inputProperties.getProperty( Index.PropertyKeys.FIELD ) ); globalProperties.setProperty( Index.PropertyKeys.TERMPROCESSOR, inputProperties.getProperty( Index.PropertyKeys.TERMPROCESSOR ) ); 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 ] ); globalProperties.setProperty( Index.PropertyKeys.MAXCOUNT, inputProperties.getProperty( Index.PropertyKeys.MAXCOUNT ) ); globalProperties.setProperty( Index.PropertyKeys.MAXDOCSIZE, inputProperties.getProperty( Index.PropertyKeys.MAXDOCSIZE ) ); globalProperties.setProperty( Index.PropertyKeys.POSTINGS, inputProperties.getProperty( Index.PropertyKeys.POSTINGS ) ); globalProperties.setProperty( Index.PropertyKeys.OCCURRENCES, inputProperties.getProperty( Index.PropertyKeys.OCCURRENCES ) ); globalProperties.setProperty( Index.PropertyKeys.DOCUMENTS, inputProperties.getProperty( Index.PropertyKeys.DOCUMENTS ) ); globalProperties.setProperty( Index.PropertyKeys.TERMS, inputProperties.getProperty( Index.PropertyKeys.TERMS ) ); if ( havePayloads ) globalProperties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );