diff options
author | James Moger <james.moger@gitblit.com> | 2012-03-15 18:02:14 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-03-15 18:02:14 -0400 |
commit | d896e62505a429ee27237b3302d7c04e7ff8e6df (patch) | |
tree | 7ab9f88b8e83cfe198e9750642e82c390251b01b /src/com/gitblit/Constants.java | |
parent | 68ce2ce77157b2fda9c4f4a0893ece499e747320 (diff) | |
download | gitblit-d896e62505a429ee27237b3302d7c04e7ff8e6df.tar.gz gitblit-d896e62505a429ee27237b3302d7c04e7ff8e6df.zip |
Refactored Lucene integration and fixed two index deleteDocument bugs
Diffstat (limited to 'src/com/gitblit/Constants.java')
-rw-r--r-- | src/com/gitblit/Constants.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java index 3f823de1..54a6db3f 100644 --- a/src/com/gitblit/Constants.java +++ b/src/com/gitblit/Constants.java @@ -15,6 +15,7 @@ */
package com.gitblit;
+
/**
* Constant values used by Gitblit.
*
@@ -258,4 +259,20 @@ public class Constants { return name().toLowerCase();
}
}
+
+ /**
+ * The types of objects that can be indexed and queried.
+ */
+ public static enum SearchObjectType {
+ commit, blob, issue;
+
+ static SearchObjectType fromName(String name) {
+ for (SearchObjectType value : values()) {
+ if (value.name().equals(name)) {
+ return value;
+ }
+ }
+ return null;
+ }
+ }
}
|