public static ArtifactInfo constructArtifactInfo( Document doc, IndexingContext context ) { // if no UINFO can't create, must be a different type of record if ( doc.get( ArtifactInfo.UINFO ) == null ) { return null; } boolean res = false; ArtifactInfo artifactInfo = new ArtifactInfo(); for ( IndexCreator ic : context.getIndexCreators() ) { res |= ic.updateArtifactInfo( doc, artifactInfo ); } return res ? artifactInfo : null; }
static Document updateLegacyDocument( Document doc, IndexingContext context ) { ArtifactInfo ai = IndexUtils.constructArtifactInfo( doc, context ); if ( ai == null ) { return doc; } Document document = new Document(); document.add( new Field( ArtifactInfo.UINFO, ai.getUinfo(), Field.Store.YES, Field.Index.UN_TOKENIZED ) ); for ( IndexCreator ic : context.getIndexCreators() ) { if ( ic instanceof LegacyDocumentUpdater ) { ( (LegacyDocumentUpdater) ic ).updateLegacyDocument( ai, document ); } } return document; }
for ( IndexCreator ic : context.getIndexCreators() )
Long.toString( System.currentTimeMillis() ), Store.YES, Index.NO ) ); for ( IndexCreator indexCreator : context.getIndexCreators() ) for ( IndexCreator indexCreator : context.getIndexCreators() )
for ( IndexCreator indexCreator : context.getIndexCreators() )
baseContext.getIndexCreators(), // true );
context.getIndexCreators(), // true );