From 015b134bc2166be27d92009b512c01c2afd47b04 Mon Sep 17 00:00:00 2001 From: Dotty Dotter Date: Thu, 9 Apr 2026 12:23:35 +0200 Subject: [PATCH] PortalaAdapter: chunksize-Floor auf 1500 (#61 Bug 5 follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Berlin-PARDOK ist von Schriftlichen Anfragen dominiert und liefert ohne server-side ETYPF-Filter (BE: document_type=None) bei chunksize=100 nur 1-2 Anträge zurück. Damit reicht das Window selbst für limit=20 nicht aus, um z.B. die A100-Antrag-Drucksache 19/2650 zu finden — und get_document() liefert None. Floor bewusst hoch auf 1500 angehoben (vorher 100/500). Bei einem typischen Verhältnis 1:30 Antrag/Anfrage in BE liefert das ~50 Anträge, genug für robuste Lookups in den letzten 24 Monaten. 176 Unit-Tests grün. Refs: #61 Bug 5 Co-Authored-By: Claude Opus 4.6 (1M context) --- app/parlamente.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/parlamente.py b/app/parlamente.py index 907fe2f..2d0695d 100644 --- a/app/parlamente.py +++ b/app/parlamente.py @@ -754,12 +754,13 @@ class PortalaAdapter(ParlamentAdapter): return [] # Step 3: fetch the HTML hit list - # Take a generous chunk so the client-side title filter - # still has enough material to work with. Quick-win for #13 - # until the eUI sf-Index for real server-side fulltext is - # reverse-engineered: bump the unfiltered chunk floor and - # the query-filtered chunk ceiling. - chunksize = max(limit * 10, 500) if query else max(limit * 2, 100) + # Take a generous chunk so der client-side type-filter + # genug Material zum Filtern hat. Berlin-PARDOK ist + # dominiert von "Schriftliche Anfrage"-Hits und ohne + # server-side ETYPF-Filter (BE: document_type=None) liefern + # 100 Roh-Hits oft nur 1-2 Anträge. Floor bewusst hoch. + # Quick-win für #13 + #61 Bug 5. + chunksize = max(limit * 10, 1500) report_resp = await client.post( report_html, json={"report_id": report_id, "start": 0, "chunksize": chunksize},