Skip to content

Commit 8b9b031

Browse files
committed
Refactored the Indexer
1 parent 30f29cd commit 8b9b031

File tree

13 files changed

+538
-462
lines changed

13 files changed

+538
-462
lines changed

logicaldoc-core/src/main/java/com/logicaldoc/core/CorePlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.slf4j.LoggerFactory;
1111

1212
import com.logicaldoc.core.dashlet.DashletContent;
13+
import com.logicaldoc.core.searchengine.indexer.IndexerTask;
1314
import com.logicaldoc.core.util.IconSelector;
1415
import com.logicaldoc.util.config.ContextProperties;
1516
import com.logicaldoc.util.plugin.LogicalDOCPlugin;
@@ -60,6 +61,8 @@ public void install() throws PluginException {
6061
pbean.setProperty("threadpool.Email.type", "default");
6162
pbean.setProperty("threadpool.EventCollector.max", "20");
6263
pbean.setProperty("threadpool.EventCollector.type", "default");
64+
pbean.setProperty("threadpool."+IndexerTask.NAME+".max", "2");
65+
pbean.setProperty("threadpool."+IndexerTask.NAME+".type", "default");
6366

6467
pbean.write();
6568
} catch (IOException e) {

logicaldoc-core/src/main/java/com/logicaldoc/core/document/DocumentEvent.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.logicaldoc.core.document;
22

3+
import java.util.Arrays;
4+
import java.util.List;
5+
36
/**
47
* Possible events in the document's history
58
*
@@ -32,6 +35,15 @@ public String toKey() {
3235
return "event." + name().toLowerCase().replace("_", ".");
3336
}
3437

38+
/**
39+
* Retrieves the all resource bundle keys
40+
*
41+
* @return A list of keys
42+
*/
43+
public List<String> allKeys() {
44+
return Arrays.asList(DocumentEvent.values()).stream().map(e -> e.toKey()).toList();
45+
}
46+
3547
@Override
3648
public String toString() {
3749
return toKey();

logicaldoc-core/src/main/java/com/logicaldoc/core/folder/FolderEvent.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.logicaldoc.core.folder;
22

3+
import java.util.Arrays;
4+
import java.util.List;
5+
36
/**
47
* Possible events in the folder's history
58
*
@@ -32,6 +35,15 @@ public String toKey() {
3235
return "event.folder." + name().toLowerCase().replace("_", ".");
3336
}
3437

38+
/**
39+
* Retrieves the all resource bundle keys
40+
*
41+
* @return A list of keys
42+
*/
43+
public List<String> allKeys() {
44+
return Arrays.asList(FolderEvent.values()).stream().map(e -> e.toKey()).toList();
45+
}
46+
3547
@Override
3648
public String toString() {
3749
return toKey();

0 commit comments

Comments
 (0)