Class MinimalArtifactInfoIndexCreator

  • All Implemented Interfaces:
    IndexCreator, LegacyDocumentUpdater

    @Singleton
    @Named("min")
    public class MinimalArtifactInfoIndexCreator
    extends AbstractIndexCreator
    implements LegacyDocumentUpdater
    A minimal index creator used to provide basic information about Maven artifact. This creator will create the index fast, will not open any file to be fastest as possible but it has some drawbacks: The information gathered by this creator are sometimes based on "best-effort" only, and does not reflect the reality (ie. maven archetype packaging @see MavenArchetypeArtifactInfoIndexCreator).
    Author:
    cstamas
    • Field Detail

      • FLD_INFO

        public static final IndexerField FLD_INFO
        Info: packaging, lastModified, size, sourcesExists, javadocExists, signatureExists. Stored, not indexed.
      • FLD_GROUP_ID_KW

        public static final IndexerField FLD_GROUP_ID_KW
      • FLD_GROUP_ID

        public static final IndexerField FLD_GROUP_ID
      • FLD_ARTIFACT_ID_KW

        public static final IndexerField FLD_ARTIFACT_ID_KW
      • FLD_ARTIFACT_ID

        public static final IndexerField FLD_ARTIFACT_ID
      • FLD_VERSION_KW

        public static final IndexerField FLD_VERSION_KW
      • FLD_PACKAGING

        public static final IndexerField FLD_PACKAGING
      • FLD_EXTENSION

        public static final IndexerField FLD_EXTENSION
      • FLD_CLASSIFIER

        public static final IndexerField FLD_CLASSIFIER
      • FLD_DESCRIPTION

        public static final IndexerField FLD_DESCRIPTION
      • FLD_LAST_MODIFIED

        public static final IndexerField FLD_LAST_MODIFIED
    • Constructor Detail

      • MinimalArtifactInfoIndexCreator

        public MinimalArtifactInfoIndexCreator()
    • Method Detail

      • updateDocument

        public void updateDocument​(ArtifactInfo ai,
                                   org.apache.lucene.document.Document doc)
        Description copied from interface: IndexCreator
        Update Lucene Document from a given ArtifactInfo.
        Specified by:
        updateDocument in interface IndexCreator
      • updateArtifactInfo

        public boolean updateArtifactInfo​(org.apache.lucene.document.Document doc,
                                          ArtifactInfo ai)
        Description copied from interface: IndexCreator
        Update an ArtifactInfo from given Lucene Document.
        Specified by:
        updateArtifactInfo in interface IndexCreator
        Returns:
        true is artifact info has been updated
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getIndexerFields

        public java.util.Collection<IndexerField> getIndexerFields()
        Description copied from interface: IndexCreator
        Returns the indexer fields that this IndexCreator introduces to index.
        Specified by:
        getIndexerFields in interface IndexCreator
        Returns: