refactor(search): remove NLP/smart-search feature entirely #772

Merged
marcel merged 51 commits from worktree-feat+nlp-service into main 2026-06-08 10:57:01 +02:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 08c11e567c - Show all commits

View File

@@ -8,5 +8,5 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties("app.nl-search.rate-limit")
@Data
public class NlSearchRateLimitProperties {
private int maxRequestsPerMinute = 5;
private int maxRequestsPerMinute = 20;
}

View File

@@ -135,7 +135,7 @@ app:
nl-search:
rate-limit:
max-requests-per-minute: 5
max-requests-per-minute: 20
ocr:
sender-model:

View File

@@ -138,14 +138,14 @@ class NlSearchControllerTest {
.andExpect(jsonPath("$.code").value("SMART_SEARCH_UNAVAILABLE"));
}
// --- 7. 6th request in 1 minute → 429 (rate limit = 5/min default) ---
// --- 7. 21st request in 1 minute → 429 (rate limit = 20/min default) ---
@Test
@WithMockUser(username = "user@test.com", authorities = {"READ_ALL"})
void search_returns429_onSixthRequestWithinRateLimit() throws Exception {
void search_returns429_on21stRequestWithinRateLimit() throws Exception {
when(nlQueryParserService.search(anyString(), anyString(), any())).thenReturn(makeResponse());
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 20; i++) {
mockMvc.perform(post("/api/search/nl").with(csrf())
.contentType(MediaType.APPLICATION_JSON)
.content("{\"query\":\"Briefe von Walter\",\"lang\":\"de\"}"))