From 4e1930a8d9a4e1e90dadf36641f491fdda09f216 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 19 Mar 2012 22:12:08 -0400 Subject: [PATCH] Polish the Lucene search page. Integrate both search mechanisms. --- src/com/gitblit/Constants.java | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java index a28a871..54a6db3 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. * @@ -64,6 +65,10 @@ public static final String PROPOSAL_EXT = ".json"; public static final String ENCODING = "UTF-8"; + + public static final int LEN_SHORTLOG = 80; + + public static final int LEN_SHORTLOG_REFS = 60; public static String getGitBlitVersion() { return NAME + " v" + VERSION; @@ -254,4 +259,20 @@ 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; + } + } } -- Gitblit v1.9.1