@Override public List<IndexCreator> getIndexCreators() { return context.getIndexCreators(); }
public List<IndexCreator> getIndexCreators() { HashSet<IndexCreator> creators = new HashSet<IndexCreator>(); for ( IndexingContext ctx : getMembers() ) { creators.addAll( ctx.getIndexCreators() ); } return new ArrayList<IndexCreator>( creators ); }
public List<IndexCreator> getIndexCreators() { HashSet<IndexCreator> creators = new HashSet<IndexCreator>(); for ( IndexingContext ctx : getMembers() ) { creators.addAll( ctx.getIndexCreators() ); } return new ArrayList<IndexCreator>( creators ); }
public List<IndexCreator> getIndexCreators() { HashSet<IndexCreator> creators = new HashSet<IndexCreator>(); for ( IndexingContext ctx : getMembers() ) { creators.addAll( ctx.getIndexCreators() ); } return new ArrayList<IndexCreator>( creators ); }
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; }
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; }
Long.toString( System.currentTimeMillis() ), Store.YES, Index.NO ) ); for ( IndexCreator indexCreator : context.getIndexCreators() ) for ( IndexCreator indexCreator : context.getIndexCreators() )
Long.toString( System.currentTimeMillis() ), Store.YES, Index.NO ) ); for ( IndexCreator indexCreator : context.getIndexCreators() ) for ( IndexCreator indexCreator : context.getIndexCreators() )
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; }
Long.toString( System.currentTimeMillis() ), Store.YES, Index.NO ) ); for ( IndexCreator indexCreator : context.getIndexCreators() ) for ( IndexCreator indexCreator : context.getIndexCreators() )
context.getIndexCreators(), // true );
for ( IndexCreator ic : context.getIndexCreators() )
context.getIndexCreators(), // true );
for ( IndexCreator ic : context.getIndexCreators() )
context.getIndexCreators(), // true );
context.getIndexCreators(), // true );
for (IndexCreator ic : indexingContext.getIndexCreators()) { if (ic instanceof NotifyingIndexCreator) { nic = (NotifyingIndexCreator) ic;