刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package jnpf.dmsService.search;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
@Data
@Component
@ConfigurationProperties(prefix = "dms.search")
public class DmsSearchProperties {
    private boolean enabled;
    private String redisQueueKey = "dms:search:index:tasks";
    private int redisPollTimeoutSeconds = 5;
    private int maxAttempts = 3;
    private long maxFileBytes = 100L * 1024L * 1024L;
    private int maxTextChars = 5_000_000;
    private int minPdfTextCharsPerPage = 20;
    private Ocr ocr = new Ocr();
    private Meilisearch meilisearch = new Meilisearch();
 
    @Data
    public static class Ocr {
        private boolean enabled;
        private String provider = "";
    }
 
    @Data
    public static class Meilisearch {
        private String baseUrl = "http://127.0.0.1:7700";
        private String apiKey = "";
        private String indexName = "dms_documents";
        private int connectTimeoutMs = 3_000;
        private int readTimeoutMs = 10_000;
    }
}