An instance of this class exposes a {@link #run()} methodthat will index the {@link DocumentSequence} provided at construction timeby calling {@link Scan} and {@link Combine} in sequence.
Additionally, a main method provides easy access to index construction.
All indexing parameters are available either as chainable setters that can be called optionally before invoking {@link #run()}, or as public mutable collections and maps. For instance,
new IndexBuilder( "foo", sequence ).skips( true ).run();will build an index with basename foo using skips. If instead we want to index just the first field of the sequence, and use a {@link ShiftAddXorSignedStringMap}as a term map, we can use the following code:
new IndexBuilder( "foo", sequence ) .termMapClass( ShiftAddXorSignedMinimalPerfectHash.class ) .indexedFields( 0 ).run();
More sophisticated modifications can be applied using public maps:
IndexBuilder indexBuilder = new IndexBuilder( "foo", sequence ); indexBuilder.virtualDocumentGaps.put( 0, 30 ); indexBuilder.virtualDocumentResolver.put( 0, someVirtualDocumentResolver ); indexBuilder.run();
|
|