Skip to content

Commit 90e9672

Browse files
committed
Make index time configurable
1 parent 9d6498c commit 90e9672

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

searchcode.properties.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ timeindex_location=./index/time/
1111
timeindex_facets_location=./index/time/facet/
1212
check_repo_chages=600
1313
check_filerepo_changes=600
14+
index_time=5
1415
only_localhost=false
1516
low_memory=false
1617
log_level=SEVERE

src/main/java/com/searchcode/app/service/JobService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public JobService() {
6767
this.helpers = Singleton.getHelpers();
6868
this.UPDATETIME = Singleton.getHelpers().tryParseInt(Properties.getProperties().getProperty(Values.CHECKREPOCHANGES, Values.DEFAULTCHECKREPOCHANGES), Values.DEFAULTCHECKREPOCHANGES);
6969
this.FILEINDEXUPDATETIME = Singleton.getHelpers().tryParseInt(Properties.getProperties().getProperty(Values.CHECKFILEREPOCHANGES, Values.DEFAULTCHECKFILEREPOCHANGES), Values.DEFAULTCHECKFILEREPOCHANGES);
70-
this.INDEXTIME = 1;
70+
this.INDEXTIME = Singleton.getHelpers().tryParseInt(Properties.getProperties().getProperty(Values.INDEXTIME, Values.DEFAULTINDEXTIME), Values.DEFAULTINDEXTIME);
7171
}
7272

7373
/**

src/main/java/com/searchcode/app/service/route/AdminRouteService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public Map<String, Object> adminPage(Request request, Response response) {
146146
map.put(Values.DEEP_GUESS_FILES, Properties.getProperties().getProperty(Values.DEEP_GUESS_FILES, Values.DEFAULT_DEEP_GUESS_FILES));
147147
map.put(Values.HOST_NAME, Properties.getProperties().getProperty(Values.HOST_NAME, Values.DEFAULT_HOST_NAME));
148148
map.put(Values.INDEX_ALL_FIELDS, Properties.getProperties().getProperty(Values.INDEX_ALL_FIELDS, Values.DEFAULT_INDEX_ALL_FIELDS));
149-
149+
map.put(Values.INDEXTIME, Properties.getProperties().getProperty(Values.INDEXTIME, Values.DEFAULTINDEXTIME));
150150

151151
map.put("repoCount", this.getStat("repoCount"));
152152
map.put("numDocs", this.getStat("numDocs"));

src/main/resources/spark/template/freemarker/admin.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ repository_location=${repository_location}
166166
trash_location=${trash_location}
167167
check_repo_chages=${check_repo_chages}
168168
check_filerepo_changes=${check_filerepo_changes}
169+
index_time=${index_time}
169170
spelling_corrector_size=${spelling_corrector_size}
170171
max_document_queue_size=${max_document_queue_size}
171172
max_document_queue_line_size=${max_document_queue_line_size}

0 commit comments

Comments
 (0)