maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csta...@apache.org
Subject [3/6] git commit: Add file ext to be searchable.
Date Wed, 27 Aug 2014 15:38:34 GMT
Add file ext to be searchable.


Project: http://git-wip-us.apache.org/repos/asf/maven-indexer/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-indexer/commit/11bd6b96
Tree: http://git-wip-us.apache.org/repos/asf/maven-indexer/tree/11bd6b96
Diff: http://git-wip-us.apache.org/repos/asf/maven-indexer/diff/11bd6b96

Branch: refs/heads/master
Commit: 11bd6b96465cb6b9d3f51378e5dc47616541fb61
Parents: 22fbfe0
Author: Tamas Cservenak <tamas@cservenak.net>
Authored: Sun Jun 29 19:41:00 2014 +0200
Committer: Tamas Cservenak <tamas@cservenak.net>
Committed: Sun Jun 29 19:41:00 2014 +0200

----------------------------------------------------------------------
 indexer-core/src/main/java/org/apache/maven/index/MAVEN.java     | 3 +++
 .../maven/index/creator/MinimalArtifactInfoIndexCreator.java     | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-indexer/blob/11bd6b96/indexer-core/src/main/java/org/apache/maven/index/MAVEN.java
----------------------------------------------------------------------
diff --git a/indexer-core/src/main/java/org/apache/maven/index/MAVEN.java b/indexer-core/src/main/java/org/apache/maven/index/MAVEN.java
index 9505cfb..af2e472 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/MAVEN.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/MAVEN.java
@@ -44,6 +44,9 @@ public interface MAVEN
     // Artifact Packaging (extension for secondary artifacts!).
     Field PACKAGING = new Field( null, MAVEN_NAMESPACE, "packaging", "Packaging/Extension"
);
 
+    // Artifact Packaging (extension for secondary artifacts!).
+    Field EXTENSION = new Field( null, MAVEN_NAMESPACE, "extension", "Extension" );
+
     Field CLASSIFIER = new Field( null, MAVEN_NAMESPACE, "classifier", "Classifier" );
 
     // NAME: Artifact Name (from POM)

http://git-wip-us.apache.org/repos/asf/maven-indexer/blob/11bd6b96/indexer-core/src/main/java/org/apache/maven/index/creator/MinimalArtifactInfoIndexCreator.java
----------------------------------------------------------------------
diff --git a/indexer-core/src/main/java/org/apache/maven/index/creator/MinimalArtifactInfoIndexCreator.java
b/indexer-core/src/main/java/org/apache/maven/index/creator/MinimalArtifactInfoIndexCreator.java
index 316e4c8..fe90bdb 100644
--- a/indexer-core/src/main/java/org/apache/maven/index/creator/MinimalArtifactInfoIndexCreator.java
+++ b/indexer-core/src/main/java/org/apache/maven/index/creator/MinimalArtifactInfoIndexCreator.java
@@ -84,6 +84,9 @@ public class MinimalArtifactInfoIndexCreator
     public static final IndexerField FLD_PACKAGING = new IndexerField( MAVEN.PACKAGING, IndexerFieldVersion.V1,
"p",
         "Artifact Packaging (as keyword)", Store.NO, Index.NOT_ANALYZED );
 
+    public static final IndexerField FLD_EXTENSION = new IndexerField( MAVEN.EXTENSION, IndexerFieldVersion.V1,
"e",
+        "Artifact extension (as keyword)", Store.NO, Index.NOT_ANALYZED );
+
     public static final IndexerField FLD_CLASSIFIER = new IndexerField( MAVEN.CLASSIFIER,
IndexerFieldVersion.V1, "l",
         "Artifact classifier (as keyword)", Store.NO, Index.NOT_ANALYZED );
 
@@ -263,6 +266,7 @@ public class MinimalArtifactInfoIndexCreator
         doc.add( FLD_GROUP_ID.toField( ai.getGroupId() ) );
         doc.add( FLD_ARTIFACT_ID.toField( ai.getArtifactId() ) );
         doc.add( FLD_VERSION.toField( ai.getVersion() ) );
+        doc.add( FLD_EXTENSION.toField( ai.getFileExtension() ) );
 
         if ( ai.getName() != null )
         {


Mime
View raw message