Preserve cross-field search matching

This commit is contained in:
2026-09-16 22:34:18 +03:00
parent 14e86ccdd8
commit 2c43c7c9ad
4 changed files with 20 additions and 13 deletions

View File

@@ -47,7 +47,7 @@ class SearchApiTest(unittest.TestCase):
self.assertEqual(planned["minimum_should_match"], 1)
self.assertNotIn("filter", planned)
self.assertTrue(any("constant_score" in clause for clause in planned["should"]))
self.assertTrue(any("общество с ограниченной ответственностью" in clause.get("match", {}).get("text_ru", {}).get("query", "") for clause in planned["should"]))
self.assertTrue(any("общество с ограниченной ответственностью" in clause.get("multi_match", {}).get("query", "") for clause in planned["should"]))
def test_production_api_boosts_tax_code_for_profit_tax_query(self):
with tempfile.TemporaryDirectory() as temporary: