public static Document updateDocument( Document doc, IndexingContext context, boolean updateLastModified ) { ArtifactInfo ai = constructArtifactInfo( doc, context ); if ( ai == null ) { return doc; } Document document = new Document(); // unique key document.add( new Field( ArtifactInfo.UINFO, ai.getUinfo(), Field.Store.YES, Field.Index.NOT_ANALYZED ) ); if ( updateLastModified || doc.getField( ArtifactInfo.LAST_MODIFIED ) == null ) { document.add( new Field( ArtifactInfo.LAST_MODIFIED, // Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) ); } else { document.add( doc.getField( ArtifactInfo.LAST_MODIFIED ) ); } for ( IndexCreator ic : context.getIndexCreators() ) { ic.updateDocument( ai, document ); } return document; }
public static Document updateDocument( Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai ) { if ( ai == null ) { ai = constructArtifactInfo( doc, context ); if ( ai == null ) { return doc; } } Document document = new Document(); // unique key document.add( new Field( ArtifactInfo.UINFO, ai.getUinfo(), Field.Store.YES, Field.Index.NOT_ANALYZED ) ); if ( updateLastModified || doc.getField( ArtifactInfo.LAST_MODIFIED ) == null ) { document.add( new Field( ArtifactInfo.LAST_MODIFIED, // Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) ); } else { document.add( doc.getField( ArtifactInfo.LAST_MODIFIED ) ); } for ( IndexCreator ic : context.getIndexCreators() ) { ic.updateDocument( ai, document ); } return document; }
public static Document updateDocument( Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai ) { if ( ai == null ) { ai = constructArtifactInfo( doc, context ); if ( ai == null ) { return doc; } } Document document = new Document(); // unique key document.add( new Field( ArtifactInfo.UINFO, ai.getUinfo(), Field.Store.YES, Field.Index.NOT_ANALYZED ) ); if ( updateLastModified || doc.getField( ArtifactInfo.LAST_MODIFIED ) == null ) { document.add( new Field( ArtifactInfo.LAST_MODIFIED, // Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) ); } else { document.add( doc.getField( ArtifactInfo.LAST_MODIFIED ) ); } for ( IndexCreator ic : context.getIndexCreators() ) { ic.updateDocument( ai, document ); } return document; }
indexCreator.updateDocument( getArtifactInfo(), doc );
indexCreator.updateDocument( getArtifactInfo(), doc );
indexCreator.updateDocument( getArtifactInfo(), doc );