Implements a low-weight fallback for multiword search. Tests: 22 passed; the OpenSearch integration test is skipped because no direct endpoint is available.
Implements a low-weight fallback for multiword search. Tests: 22 passed; the OpenSearch integration test is skipped because no direct endpoint is available.
Independent review findings (formal REQUEST_CHANGES review is unavailable because Gitea rejects review by the PR author):
P1:backend/search/query.py:138-151 lets each relaxed multi_match (operator: OR) satisfy outer minimum_should_match: 1; a single token can admit a document. boost: 0.1 only changes score and does not constrain candidates. Validate against the saved 520-query set and annotated baseline before accepting the fallback, as required by the plan.
P2: unstripped 3+ word queries also receive this OR fallback, including full act titles such as “Гражданский кодекс Кыргызской Республики”. Current exact-act coverage tests only a two-word title and generated DSL, not actual ranking or adjacent-code regressions.
Added tests assert query JSON only. Direct OpenSearch integration was skipped/unavailable, so DSL acceptance and actual RU/KY ranking remain unverified.
Independent review findings (formal REQUEST_CHANGES review is unavailable because Gitea rejects review by the PR author):
- **P1:** `backend/search/query.py:138-151` lets each relaxed `multi_match` (`operator: OR`) satisfy outer `minimum_should_match: 1`; a single token can admit a document. `boost: 0.1` only changes score and does not constrain candidates. Validate against the saved 520-query set and annotated baseline before accepting the fallback, as required by the plan.
- **P2:** unstripped 3+ word queries also receive this OR fallback, including full act titles such as “Гражданский кодекс Кыргызской Республики”. Current exact-act coverage tests only a two-word title and generated DSL, not actual ranking or adjacent-code regressions.
- Added tests assert query JSON only. Direct OpenSearch integration was skipped/unavailable, so DSL acceptance and actual RU/KY ranking remain unverified.
Independent follow-up review of 3b56445 and the full PR diff vs main: blocking findings remain.
P1 (residual single-token fallback): the 75% threshold still rounds down for the two-token content query produced by prefix stripping. For the tested “как регулируется взыскание алиментов”, minimum_should_match: 75% on “взыскание алиментов” requires only one term; that clause can still independently satisfy outer minimum_should_match: 1. The earlier concern is reduced for longer queries, not closed.
P1 (plan gate/evidence): no 520-query rerun or annotated relevance baseline is attached. The plan requires comparing recall and noise before accepting relaxed matching; generated-DSL tests cannot establish that.
P2 (exact act coverage): the new RU full-title case is excluded, but act abbreviations and KY titles are not covered by is_named_act_query; tests still inspect DSL only and do not check rankings or adjacent-code regressions.
The added minimum_should_match is a supported multi_match option, but direct OpenSearch integration remains skipped/unavailable; live parsing and RU/KY ranking are unverified. git diff --check is clean. No code changed and no tests run during this review.
Independent follow-up review of `3b56445` and the full PR diff vs `main`: **blocking findings remain**.
- **P1 (residual single-token fallback):** the 75% threshold still rounds down for the two-token content query produced by prefix stripping. For the tested “как регулируется взыскание алиментов”, `minimum_should_match: 75%` on “взыскание алиментов” requires only one term; that clause can still independently satisfy outer `minimum_should_match: 1`. The earlier concern is reduced for longer queries, not closed.
- **P1 (plan gate/evidence):** no 520-query rerun or annotated relevance baseline is attached. The plan requires comparing recall and noise before accepting relaxed matching; generated-DSL tests cannot establish that.
- **P2 (exact act coverage):** the new RU full-title case is excluded, but act abbreviations and KY titles are not covered by `is_named_act_query`; tests still inspect DSL only and do not check rankings or adjacent-code regressions.
The added `minimum_should_match` is a supported `multi_match` option, but direct OpenSearch integration remains skipped/unavailable; live parsing and RU/KY ranking are unverified. `git diff --check` is clean. No code changed and no tests run during this review.
Independent review of the full PR diff at 6f8b668 vs main. One code finding remains: [query.py:143-156] counts whitespace words before analysis, then uses 75% for 3+ words. The mapped RU fields use the built-in russian analyzer, which removes stopwords; e.g. “права и обязанности” has 3 whitespace words but only 2 analyzed terms, so 75% rounds down to 1. That relaxed clause can still independently admit a document on one matching term. Please base the threshold on analyzed terms or require an absolute minimum for the short analyzed query, with a regression case. The explicit two-token fallback and RU/KY named-act cases from the previous review are addressed in the current code/tests.
Validation gaps, separate from code findings: no 520-query rerun or annotated relevance baseline is available, and direct OpenSearch integration remains unavailable. Thus real result quality and live DSL acceptance are unverified. git diff --check is clean; no tests run and no files changed in this review.
Independent review of the full PR diff at `6f8b668` vs `main`. **One code finding remains:** [query.py:143-156] counts whitespace words before analysis, then uses `75%` for 3+ words. The mapped RU fields use the built-in `russian` analyzer, which removes stopwords; e.g. “права и обязанности” has 3 whitespace words but only 2 analyzed terms, so 75% rounds down to 1. That relaxed clause can still independently admit a document on one matching term. Please base the threshold on analyzed terms or require an absolute minimum for the short analyzed query, with a regression case. The explicit two-token fallback and RU/KY named-act cases from the previous review are addressed in the current code/tests.
**Validation gaps, separate from code findings:** no 520-query rerun or annotated relevance baseline is available, and direct OpenSearch integration remains unavailable. Thus real result quality and live DSL acceptance are unverified. `git diff --check` is clean; no tests run and no files changed in this review.
Independent review of the full PR diff at a3d82b4 vs main. Code findings: none remain. The fallback now requires at least two analyzed matches even for short clauses; the regression test covers the Russian stopword case. The RU alias and KY named-act exclusions also address my previous code findings. git diff --check is clean.
Validation still unavailable: no 520-query replay or annotated relevance baseline is attached, so recall/noise and plan acceptance criteria remain unverified. Direct OpenSearch integration is unavailable, so this review cannot confirm live DSL parsing or actual RU/KY ranking. These are evidence gaps, not additional code defects found in this diff. No files changed and no tests run during this review.
Independent review of the full PR diff at `a3d82b4` vs `main`. **Code findings: none remain.** The fallback now requires at least two analyzed matches even for short clauses; the regression test covers the Russian stopword case. The RU alias and KY named-act exclusions also address my previous code findings. `git diff --check` is clean.
**Validation still unavailable:** no 520-query replay or annotated relevance baseline is attached, so recall/noise and plan acceptance criteria remain unverified. Direct OpenSearch integration is unavailable, so this review cannot confirm live DSL parsing or actual RU/KY ranking. These are evidence gaps, not additional code defects found in this diff. No files changed and no tests run during this review.
Final independent review of the complete PR diff at cf510f0 vs main, including CHANGELOG.md and prior query fixes. Code findings: none; no blocking code defects found. The minimum-two threshold addresses the short and stopword cases; the RU/KY act guards are retained. The changelog entry matches the version bump and describes the behavior. git diff --check is clean.
Validation limitations remain: no 520-query replay or annotated relevance baseline is attached, so result quality and the plan acceptance criteria remain unverified. No direct OpenSearch endpoint was available, so live DSL parsing and ranking were not verified. I did not run tests or modify files during this review.
Final independent review of the complete PR diff at `cf510f0` vs `main`, including `CHANGELOG.md` and prior query fixes. **Code findings: none; no blocking code defects found.** The minimum-two threshold addresses the short and stopword cases; the RU/KY act guards are retained. The changelog entry matches the version bump and describes the behavior. `git diff --check` is clean.
**Validation limitations remain:** no 520-query replay or annotated relevance baseline is attached, so result quality and the plan acceptance criteria remain unverified. No direct OpenSearch endpoint was available, so live DSL parsing and ranking were not verified. I did not run tests or modify files during this review.
Независимое ревью актуального diff 9832c0c..cf510f0: обнаружен blocking finding (P1) в backend/search/query.py:44-49,139. is_named_act_query отключает fallback при любом упоминании акта, а не только при запросе его названия. Поэтому тематические запросы вроде «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» не получают OR fallback и могут по-прежнему давать пустую выдачу — это прямо оставляет часть исходной проблемы неисправленной. Нужна проверка, что запрос именно про акт (или fallback по тематической части после удаления названия). Остальной просмотренный diff: структура DSL и minimum_should_match: 2 согласуются с текущими анализаторами; git diff --check чистый, unit tests: 22 passed, 1 skipped. Интеграционную работу OpenSearch и ranking на RU/KY запросах подтвердить не удалось, endpoint недоступен.
Независимое ревью актуального diff `9832c0c..cf510f0`: обнаружен blocking finding (P1) в `backend/search/query.py:44-49,139`. `is_named_act_query` отключает fallback при любом упоминании акта, а не только при запросе его названия. Поэтому тематические запросы вроде «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» не получают OR fallback и могут по-прежнему давать пустую выдачу — это прямо оставляет часть исходной проблемы неисправленной. Нужна проверка, что запрос именно про акт (или fallback по тематической части после удаления названия). Остальной просмотренный diff: структура DSL и `minimum_should_match: 2` согласуются с текущими анализаторами; `git diff --check` чистый, unit tests: 22 passed, 1 skipped. Интеграционную работу OpenSearch и ranking на RU/KY запросах подтвердить не удалось, endpoint недоступен.
P2 — backend/search/query.py:44-49,139: is_named_act_query() срабатывает при любом упоминании кодекса и полностью отключает relaxed fallback для всего запроса. Для тематических многословных запросов «Налоговый кодекс ответственность за неуплату налога» и «Трудовой кодекс порядок выплаты зарплаты» build_search_query() создаёт только строгий AND и match_phrase, без новой OR-ветки. Если документ не содержит все термины, запрос по-прежнему может дать пустую выдачу. Ограничьте исключение запросами, которые действительно ищут название акта, либо применяйте fallback к тематической части после названия; добавьте тесты для таких запросов. Уточнение к прежнему комментарию: «закон о труде порядок выплаты зарплаты» текущий regex не блокирует, поэтому этот пример не подтверждает замечание.
Проверено на cf510f08f8ef8a7a473c0f7659063a586b550e22: полный diff, генерация DSL для указанных запросов, git diff --check, 35 unit tests passed (1 skipped). Прямой endpoint OpenSearch и повторный прогон relevance baseline недоступны, поэтому фактическую выдачу и изменение recall подтвердить не удалось.
P2 — `backend/search/query.py:44-49,139`: `is_named_act_query()` срабатывает при любом упоминании кодекса и полностью отключает relaxed fallback для всего запроса. Для тематических многословных запросов «Налоговый кодекс ответственность за неуплату налога» и «Трудовой кодекс порядок выплаты зарплаты» `build_search_query()` создаёт только строгий AND и match_phrase, без новой OR-ветки. Если документ не содержит все термины, запрос по-прежнему может дать пустую выдачу. Ограничьте исключение запросами, которые действительно ищут название акта, либо применяйте fallback к тематической части после названия; добавьте тесты для таких запросов. Уточнение к прежнему комментарию: «закон о труде порядок выплаты зарплаты» текущий regex не блокирует, поэтому этот пример не подтверждает замечание.
Проверено на `cf510f08f8ef8a7a473c0f7659063a586b550e22`: полный diff, генерация DSL для указанных запросов, `git diff --check`, 35 unit tests passed (1 skipped). Прямой endpoint OpenSearch и повторный прогон relevance baseline недоступны, поэтому фактическую выдачу и изменение recall подтвердить не удалось.
Independent review of full PR diff at 3afac00 vs main. Blocking P1 remains: the new title-term stripping preserves topical fallbacks for the two examples from #1701, and excludes Гражданский кодекс Кыргызской Республики, but it does not identify all act-title-only queries. For example, relaxed_query_text(ru, Закон о защите прав потребителей) returns защите прав потребителей, so the relaxed OR fallback is still generated for that title-only query. The same occurs with Закон Кыргызской Республики о защите прав потребителей. Please add coverage/handling for named statute titles while keeping topical queries such as Налоговый кодекс ответственность за неуплату налога eligible. I inspected generated query text and the full diff; git diff --check is clean. DSL tests are present, but there is no benchmark replay or direct OpenSearch verification, so recall/noise and live ranking remain unverified.
Independent review of full PR diff at `3afac00` vs `main`. **Blocking P1 remains:** the new title-term stripping preserves topical fallbacks for the two examples from #1701, and excludes `Гражданский кодекс Кыргызской Республики`, but it does not identify all act-title-only queries. For example, `relaxed_query_text(ru, Закон о защите прав потребителей)` returns `защите прав потребителей`, so the relaxed OR fallback is still generated for that title-only query. The same occurs with `Закон Кыргызской Республики о защите прав потребителей`. Please add coverage/handling for named statute titles while keeping topical queries such as `Налоговый кодекс ответственность за неуплату налога` eligible. I inspected generated query text and the full diff; `git diff --check` is clean. DSL tests are present, but there is no benchmark replay or direct OpenSearch verification, so recall/noise and live ranking remain unverified.
Независимое ревью полного diff feb0ddd относительно main, включая исправления #1701 и #1707. Blocking code findings не осталось. Проверил, что title-only запросы «Закон о защите прав потребителей» и «Закон Кыргызской Республики о защите прав потребителей» очищаются до пустой строки и fallback не создаётся, а тематические запросы «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» сохраняют тематический хвост для fallback. Добавленные тесты покрывают эти случаи.
Проверка runtime отдельно не выполнена: OpenSearch endpoint недоступен, поэтому нет подтверждения live DSL parsing, фактического RU/KY ранжирования и replay 520 запросов. Это остаётся ограничением валидации результата, не новым дефектом кода.
Независимое ревью полного diff `feb0ddd` относительно `main`, включая исправления #1701 и #1707. **Blocking code findings не осталось.** Проверил, что title-only запросы «Закон о защите прав потребителей» и «Закон Кыргызской Республики о защите прав потребителей» очищаются до пустой строки и fallback не создаётся, а тематические запросы «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» сохраняют тематический хвост для fallback. Добавленные тесты покрывают эти случаи.
**Проверка runtime отдельно не выполнена:** OpenSearch endpoint недоступен, поэтому нет подтверждения live DSL parsing, фактического RU/KY ранжирования и replay 520 запросов. Это остаётся ограничением валидации результата, не новым дефектом кода.
Обновление по валидации: по решению автора запроса Consultant+ используется как поведенческий ориентир полноты выдачи, а не как разметка юридической корректности актов КР; дополнительный annotated relevance set для этого изменения не требуется. На сохранённом наборе найдены 180 пар с пустой выдачей Akyldash и непустой выдачей Consultant+: fallback формируется для 178 тематических запросов, 2 запроса только с названием акта оставлены для exact-act обработки. Это структурная проверка построения запроса, не измерение результатов новой выдачи. Повторный живой прогон и проверка OpenSearch остаются непроведёнными: доступного endpoint нет.
Обновление по валидации: по решению автора запроса Consultant+ используется как поведенческий ориентир полноты выдачи, а не как разметка юридической корректности актов КР; дополнительный annotated relevance set для этого изменения не требуется. На сохранённом наборе найдены 180 пар с пустой выдачей Akyldash и непустой выдачей Consultant+: fallback формируется для 178 тематических запросов, 2 запроса только с названием акта оставлены для exact-act обработки. Это структурная проверка построения запроса, не измерение результатов новой выдачи. Повторный живой прогон и проверка OpenSearch остаются непроведёнными: доступного endpoint нет.
На feb0ddde32fd2e4c2e9be013d1d7289389d7d750 остаются два связанных замечания к backend/search/query.py:44-55,151-162.
P1 — запрос только по названию акта вновь получает широкий fallback. Для запроса вида «Закон Кыргызской Республики о государственной регистрации юридических лиц» relaxed_query_text() возвращает «государственной регистрации юридических лиц». Затем создаётся OR multi_match с minimum_should_match: 2: достаточно любых двух слов из четырёх. Специальная обработка «о защите прав потребителей» закрывает этот конкретный пример, но не общий случай длинного названия акта. Это нарушает заявленное исключение для запросов по названию акта и может добавлять посторонние результаты. Нужен общий критерий для запроса только по названию либо проверка на реальном наборе названий с отдельными тестами.
P2 — удаляются слова тематической части. Для «Налоговый кодекс налоговая ставка» очистка удаляет оба слова «налоговый» и «налоговая», оставляет «ставка», и fallback не создаётся. Тематический запрос снова зависит только от строгого AND. Ограничьте удаление title-терминов сегментом названия акта, сохранив слова после него.
Оба случая воспроизведены вызовом build_search_query() на текущем коммите. Полный diff просмотрен; git diff --check чистый; 35 unit tests прошли, 1 пропущен. Прямого endpoint OpenSearch для проверки фактической выдачи нет.
На `feb0ddde32fd2e4c2e9be013d1d7289389d7d750` остаются два связанных замечания к `backend/search/query.py:44-55,151-162`.
- **P1 — запрос только по названию акта вновь получает широкий fallback.** Для запроса вида «Закон Кыргызской Республики о государственной регистрации юридических лиц» `relaxed_query_text()` возвращает «государственной регистрации юридических лиц». Затем создаётся OR `multi_match` с `minimum_should_match: 2`: достаточно любых двух слов из четырёх. Специальная обработка «о защите прав потребителей» закрывает этот конкретный пример, но не общий случай длинного названия акта. Это нарушает заявленное исключение для запросов по названию акта и может добавлять посторонние результаты. Нужен общий критерий для запроса только по названию либо проверка на реальном наборе названий с отдельными тестами.
- **P2 — удаляются слова тематической части.** Для «Налоговый кодекс налоговая ставка» очистка удаляет оба слова «налоговый» и «налоговая», оставляет «ставка», и fallback не создаётся. Тематический запрос снова зависит только от строгого AND. Ограничьте удаление title-терминов сегментом названия акта, сохранив слова после него.
Оба случая воспроизведены вызовом `build_search_query()` на текущем коммите. Полный diff просмотрен; `git diff --check` чистый; 35 unit tests прошли, 1 пропущен. Прямого endpoint OpenSearch для проверки фактической выдачи нет.
Independent follow-up review of PR #38 at 9c3cbee vs main, focused on finding #1711. No blocking code findings remain for the reported cases. The title-only query Закон Кыргызской Республики о государственной регистрации юридических лиц produces no low-weight fallback; Налоговый кодекс налоговая ставка produces fallback text налоговая ставка with both topical terms preserved. The 7 relevance tests pass and git diff --check is clean. Runtime/OpenSearch ranking remains unverified because the endpoint is unavailable.
Independent follow-up review of PR #38 at `9c3cbee` vs `main`, focused on finding #1711. **No blocking code findings remain for the reported cases.** The title-only query `Закон Кыргызской Республики о государственной регистрации юридических лиц` produces no low-weight fallback; `Налоговый кодекс налоговая ставка` produces fallback text `налоговая ставка` with both topical terms preserved. The 7 relevance tests pass and `git diff --check` is clean. Runtime/OpenSearch ranking remains unverified because the endpoint is unavailable.
Проверил полный diff PR 38 на 9c3cbee14184b2bb1d3e58fbfd247e489b1e5bab. Замечания из моего предыдущего ревью устранены: запрос только по названию «Закон Кыргызской Республики о государственной регистрации юридических лиц» не создаёт relaxed fallback, а «Налоговый кодекс налоговая ставка» сохраняет оба тематических слова. Также проверены тематические RU/KY запросы с названиями актов и сохранение двухтерминного порога. Новых блокирующих замечаний к коду не нашёл.
git diff --check чистый; 35 unit tests прошли, 1 пропущен. Фактическая выдача и ranking OpenSearch остаются непроверенными из-за отсутствия доступного endpoint; это ограничение проверки, а не найденный дефект.
Проверил полный diff PR 38 на `9c3cbee14184b2bb1d3e58fbfd247e489b1e5bab`. Замечания из моего предыдущего ревью устранены: запрос только по названию «Закон Кыргызской Республики о государственной регистрации юридических лиц» не создаёт relaxed fallback, а «Налоговый кодекс налоговая ставка» сохраняет оба тематических слова. Также проверены тематические RU/KY запросы с названиями актов и сохранение двухтерминного порога. Новых блокирующих замечаний к коду не нашёл.
`git diff --check` чистый; 35 unit tests прошли, 1 пропущен. Фактическая выдача и ranking OpenSearch остаются непроверенными из-за отсутствия доступного endpoint; это ограничение проверки, а не найденный дефект.
admin
merged commit 2ffb02428b into main2026-09-25 19:45:03 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements a low-weight fallback for multiword search. Tests: 22 passed; the OpenSearch integration test is skipped because no direct endpoint is available.
Independent review findings (formal REQUEST_CHANGES review is unavailable because Gitea rejects review by the PR author):
backend/search/query.py:138-151lets each relaxedmulti_match(operator: OR) satisfy outerminimum_should_match: 1; a single token can admit a document.boost: 0.1only changes score and does not constrain candidates. Validate against the saved 520-query set and annotated baseline before accepting the fallback, as required by the plan.Independent follow-up review of
3b56445and the full PR diff vsmain: blocking findings remain.minimum_should_match: 75%on “взыскание алиментов” requires only one term; that clause can still independently satisfy outerminimum_should_match: 1. The earlier concern is reduced for longer queries, not closed.is_named_act_query; tests still inspect DSL only and do not check rankings or adjacent-code regressions.The added
minimum_should_matchis a supportedmulti_matchoption, but direct OpenSearch integration remains skipped/unavailable; live parsing and RU/KY ranking are unverified.git diff --checkis clean. No code changed and no tests run during this review.Independent review of the full PR diff at
6f8b668vsmain. One code finding remains: [query.py:143-156] counts whitespace words before analysis, then uses75%for 3+ words. The mapped RU fields use the built-inrussiananalyzer, which removes stopwords; e.g. “права и обязанности” has 3 whitespace words but only 2 analyzed terms, so 75% rounds down to 1. That relaxed clause can still independently admit a document on one matching term. Please base the threshold on analyzed terms or require an absolute minimum for the short analyzed query, with a regression case. The explicit two-token fallback and RU/KY named-act cases from the previous review are addressed in the current code/tests.Validation gaps, separate from code findings: no 520-query rerun or annotated relevance baseline is available, and direct OpenSearch integration remains unavailable. Thus real result quality and live DSL acceptance are unverified.
git diff --checkis clean; no tests run and no files changed in this review.Independent review of the full PR diff at
a3d82b4vsmain. Code findings: none remain. The fallback now requires at least two analyzed matches even for short clauses; the regression test covers the Russian stopword case. The RU alias and KY named-act exclusions also address my previous code findings.git diff --checkis clean.Validation still unavailable: no 520-query replay or annotated relevance baseline is attached, so recall/noise and plan acceptance criteria remain unverified. Direct OpenSearch integration is unavailable, so this review cannot confirm live DSL parsing or actual RU/KY ranking. These are evidence gaps, not additional code defects found in this diff. No files changed and no tests run during this review.
Final independent review of the complete PR diff at
cf510f0vsmain, includingCHANGELOG.mdand prior query fixes. Code findings: none; no blocking code defects found. The minimum-two threshold addresses the short and stopword cases; the RU/KY act guards are retained. The changelog entry matches the version bump and describes the behavior.git diff --checkis clean.Validation limitations remain: no 520-query replay or annotated relevance baseline is attached, so result quality and the plan acceptance criteria remain unverified. No direct OpenSearch endpoint was available, so live DSL parsing and ranking were not verified. I did not run tests or modify files during this review.
Независимое ревью актуального diff
9832c0c..cf510f0: обнаружен blocking finding (P1) вbackend/search/query.py:44-49,139.is_named_act_queryотключает fallback при любом упоминании акта, а не только при запросе его названия. Поэтому тематические запросы вроде «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» не получают OR fallback и могут по-прежнему давать пустую выдачу — это прямо оставляет часть исходной проблемы неисправленной. Нужна проверка, что запрос именно про акт (или fallback по тематической части после удаления названия). Остальной просмотренный diff: структура DSL иminimum_should_match: 2согласуются с текущими анализаторами;git diff --checkчистый, unit tests: 22 passed, 1 skipped. Интеграционную работу OpenSearch и ranking на RU/KY запросах подтвердить не удалось, endpoint недоступен.P2 —
backend/search/query.py:44-49,139:is_named_act_query()срабатывает при любом упоминании кодекса и полностью отключает relaxed fallback для всего запроса. Для тематических многословных запросов «Налоговый кодекс ответственность за неуплату налога» и «Трудовой кодекс порядок выплаты зарплаты»build_search_query()создаёт только строгий AND и match_phrase, без новой OR-ветки. Если документ не содержит все термины, запрос по-прежнему может дать пустую выдачу. Ограничьте исключение запросами, которые действительно ищут название акта, либо применяйте fallback к тематической части после названия; добавьте тесты для таких запросов. Уточнение к прежнему комментарию: «закон о труде порядок выплаты зарплаты» текущий regex не блокирует, поэтому этот пример не подтверждает замечание.Проверено на
cf510f08f8ef8a7a473c0f7659063a586b550e22: полный diff, генерация DSL для указанных запросов,git diff --check, 35 unit tests passed (1 skipped). Прямой endpoint OpenSearch и повторный прогон relevance baseline недоступны, поэтому фактическую выдачу и изменение recall подтвердить не удалось.Independent review of full PR diff at
3afac00vsmain. Blocking P1 remains: the new title-term stripping preserves topical fallbacks for the two examples from #1701, and excludesГражданский кодекс Кыргызской Республики, but it does not identify all act-title-only queries. For example,relaxed_query_text(ru, Закон о защите прав потребителей)returnsзащите прав потребителей, so the relaxed OR fallback is still generated for that title-only query. The same occurs withЗакон Кыргызской Республики о защите прав потребителей. Please add coverage/handling for named statute titles while keeping topical queries such asНалоговый кодекс ответственность за неуплату налогаeligible. I inspected generated query text and the full diff;git diff --checkis clean. DSL tests are present, but there is no benchmark replay or direct OpenSearch verification, so recall/noise and live ranking remain unverified.Независимое ревью полного diff
feb0dddотносительноmain, включая исправления #1701 и #1707. Blocking code findings не осталось. Проверил, что title-only запросы «Закон о защите прав потребителей» и «Закон Кыргызской Республики о защите прав потребителей» очищаются до пустой строки и fallback не создаётся, а тематические запросы «Налоговый кодекс ответственность за неуплату налога» и «закон о труде порядок выплаты зарплаты» сохраняют тематический хвост для fallback. Добавленные тесты покрывают эти случаи.Проверка runtime отдельно не выполнена: OpenSearch endpoint недоступен, поэтому нет подтверждения live DSL parsing, фактического RU/KY ранжирования и replay 520 запросов. Это остаётся ограничением валидации результата, не новым дефектом кода.
Обновление по валидации: по решению автора запроса Consultant+ используется как поведенческий ориентир полноты выдачи, а не как разметка юридической корректности актов КР; дополнительный annotated relevance set для этого изменения не требуется. На сохранённом наборе найдены 180 пар с пустой выдачей Akyldash и непустой выдачей Consultant+: fallback формируется для 178 тематических запросов, 2 запроса только с названием акта оставлены для exact-act обработки. Это структурная проверка построения запроса, не измерение результатов новой выдачи. Повторный живой прогон и проверка OpenSearch остаются непроведёнными: доступного endpoint нет.
На
feb0ddde32fd2e4c2e9be013d1d7289389d7d750остаются два связанных замечания кbackend/search/query.py:44-55,151-162.relaxed_query_text()возвращает «государственной регистрации юридических лиц». Затем создаётся ORmulti_matchсminimum_should_match: 2: достаточно любых двух слов из четырёх. Специальная обработка «о защите прав потребителей» закрывает этот конкретный пример, но не общий случай длинного названия акта. Это нарушает заявленное исключение для запросов по названию акта и может добавлять посторонние результаты. Нужен общий критерий для запроса только по названию либо проверка на реальном наборе названий с отдельными тестами.Оба случая воспроизведены вызовом
build_search_query()на текущем коммите. Полный diff просмотрен;git diff --checkчистый; 35 unit tests прошли, 1 пропущен. Прямого endpoint OpenSearch для проверки фактической выдачи нет.Independent follow-up review of PR #38 at
9c3cbeevsmain, focused on finding #1711. No blocking code findings remain for the reported cases. The title-only queryЗакон Кыргызской Республики о государственной регистрации юридических лицproduces no low-weight fallback;Налоговый кодекс налоговая ставкаproduces fallback textналоговая ставкаwith both topical terms preserved. The 7 relevance tests pass andgit diff --checkis clean. Runtime/OpenSearch ranking remains unverified because the endpoint is unavailable.Проверил полный diff PR 38 на
9c3cbee14184b2bb1d3e58fbfd247e489b1e5bab. Замечания из моего предыдущего ревью устранены: запрос только по названию «Закон Кыргызской Республики о государственной регистрации юридических лиц» не создаёт relaxed fallback, а «Налоговый кодекс налоговая ставка» сохраняет оба тематических слова. Также проверены тематические RU/KY запросы с названиями актов и сохранение двухтерминного порога. Новых блокирующих замечаний к коду не нашёл.git diff --checkчистый; 35 unit tests прошли, 1 пропущен. Фактическая выдача и ranking OpenSearch остаются непроверенными из-за отсутствия доступного endpoint; это ограничение проверки, а не найденный дефект.