#### additions\r
\r
- Added optional Lucene branch indexing (issue 16) \r
-Repository branches may be optionally indexed by Lucene for improved searching. To use this feature you have to specify which branches to index within the *Edit Repository* page. Indexes are automatically built and incrementally updated on a 2 minute cycle. (i.e you will have to wait 2-3 minutes after specifying a branch to be indexed before the index will be built.)<br/><br/>\r
-If a repository has Lucene-indexed branches the *search* form on the repository pages will redirect to the root-level Lucene search page. If the repository does not specify any indexed branches then the traditional repository commit search is used.\r
+ **New:** *web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip* \r
+Repository branches may be optionally indexed by Lucene for improved searching. To use this feature you must specify which branches to index within the *Edit Repository* page; _no repositories are automatically indexed_. Gitblit will build or incrementally update enrolled repositories on a 2 minute cycle. (i.e you will have to wait 2-3 minutes after respecifying indexed branches or pushing new commits before Gitblit will build/update the repository's Lucene index.) \r
+If a repository has Lucene-indexed branches the *search* form on the repository pages will redirect to the root-level Lucene search page and only the content of those branches can be searched. \r
+If the repository does not specify any indexed branches then repository commit-traversal search is used.\r
- Allow specifying timezone to use for Gitblit which is independent of both the JVM and the system timezone (issue 54) \r
**New:** *web.timezone =* \r
- Added a built-in AJP connector for integrating Gitblit GO into an Apache mod_proxy setup (issue 59) \r
import java.text.MessageFormat;\r
import java.text.ParseException;\r
import java.util.ArrayList;\r
-import java.util.Arrays;\r
import java.util.Collections;\r
import java.util.Comparator;\r
import java.util.HashMap;\r
private final Map<String, IndexSearcher> searchers = new ConcurrentHashMap<String, IndexSearcher>();\r
private final Map<String, IndexWriter> writers = new ConcurrentHashMap<String, IndexWriter>();\r
\r
- private final Set<String> excludedExtensions = new TreeSet<String>(Arrays.asList("7z", "arc",\r
- "arj", "bin", "bmp", "dll", "doc", "docx", "exe", "gif", "gz", "jar", "jpg", "lib",\r
- "lzh", "odg", "pdf", "ppt", "png", "so", "swf", "xcf", "xls", "xlsx", "zip"));\r
-\r
+ private final String luceneIgnoreExtensions = "7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip";\r
+ private Set<String> excludedExtensions;\r
+ \r
public LuceneExecutor(IStoredSettings settings, File repositoriesFolder) {\r
this.storedSettings = settings;\r
this.repositoriesFolder = repositoriesFolder;\r
*/\r
@Override\r
public void run() {\r
+ // reload the excluded extensions\r
+ String exts = storedSettings.getString(Keys.web.luceneIgnoreExtensions, luceneIgnoreExtensions);\r
+ excludedExtensions = new TreeSet<String>(StringUtils.getStringsFromValue(exts));\r
+\r
for (String repositoryName: GitBlit.self().getRepositoryList()) {\r
RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);\r
if (model.hasCommits && !ArrayUtils.isEmpty(model.indexedBranches)) {\r