From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit,  gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command

---
 src/com/gitblit/models/SearchResult.java |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/src/com/gitblit/models/SearchResult.java b/src/com/gitblit/models/SearchResult.java
index 4a03a70..efd1b07 100644
--- a/src/com/gitblit/models/SearchResult.java
+++ b/src/com/gitblit/models/SearchResult.java
@@ -4,7 +4,7 @@
 import java.util.Date;
 import java.util.List;
 
-import com.gitblit.utils.LuceneUtils.ObjectType;
+import com.gitblit.Constants.SearchObjectType;
 
 /**
  * Model class that represents a search result.
@@ -15,6 +15,10 @@
 public class SearchResult implements Serializable {
 
 	private static final long serialVersionUID = 1L;
+	
+	public int hitId;
+	
+	public int totalHits;
 
 	public float score;
 
@@ -26,19 +30,41 @@
 
 	public String summary;
 	
+	public String fragment;
+	
 	public String repository;
+	
+	public String branch;
 
-	public String id;
+	public String commitId;
+	
+	public String path;
+	
+	public String issueId;
 
+	public List<String> tags;
+	
 	public List<String> labels;
 
-	public ObjectType type;
+	public SearchObjectType type;
 
 	public SearchResult() {
+	}
+	
+	public String getId() {
+		switch (type) {
+		case blob:
+			return path;
+		case commit:
+			return commitId;
+		case issue:
+			return issueId;
+		}
+		return commitId;
 	}
 
 	@Override
 	public String toString() {
-		return  score + " : " + type.name() + " : " + repository + " : " + id;
+		return  score + " : " + type.name() + " : " + repository + " : " + getId() + " (" + branch + ")";
 	}
 }
\ No newline at end of file

--
Gitblit v1.9.1