About the FLD_ID, the delete method for a document cannot have more than
one Term object for groupId, artifactId, and version so an ID is used.
i apologize about the others, I'll fix them right away...
Brett Porter wrote:
I think this is a possible NPE...
[EMAIL PROTECTED] wrote:
+ /**
+ * @see
org.apache.maven.repository.indexing.RepositoryIndex#deleteDocument(String,
String)
+ */
+ public void deleteDocument( String field, String value )
+ throws RepositoryIndexException, IOException
+ {
+ IndexReader indexReader = null;
+ try
+ {
+ indexReader = IndexReader.open( indexPath );
+ indexReader.delete( new Term( field, value ) );
+ }
+ catch ( IOException ie )
+ {
+ throw new RepositoryIndexException( indexPath + "is not a valid
directory." );
+ }
+ finally
+ {
+ indexReader.close();
+ }
}
}
Can you please separate reformatting commits from functional changes?
- else if( query instanceof RangeQuery )
+ else if ( query instanceof RangeQuery )
Why is a new ID required? Can't the pieces of group/artifact/type be
used as is?
+ doc.add( Field.Keyword( FLD_ID, ARTIFACT_TYPE + artifact.getId() ) );
- Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]