Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Apply shared term normalization to search terms, query matchers and the alias index

Đang mở
#346 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@bmerkle đang làm issue này rồi.

Từ ngày 19/10/2026.

  • #360 của @bmerkle — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
databases, search

Hướng nghiên cứu

Read search.validate_and_prepare_term, searchlib._parse_search_term, and query.get_matching_term_for_text, then inspect the related-terms indexes in storage/memory/related_terms_index.py and storage/sqlite/related_terms_index.py. Compare the incremental update path in ConversationBase with add_messages._collect_related_terms_for_fuzzy_index and its collection helpers. Done means all paths normalize terms consistently and both ingestion paths collect the same terms; run the relevant search, query, and indexing tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-up to #322 / #325. #325 makes the memory and SQLite term and property indexes share normalize_term (NFC, lowercase, trim, collapse whitespace). Several other places still only call .lower(), so they can disagree with the index keys:

  1. Search side. search.validate_and_prepare_term, searchlib._parse_search_term and query.get_matching_term_for_text (and the entity-matching helpers such as match_entity_name_or_type) still only lowercase. Example: for entity "Space Needle" and search term "space needle", lookup_term finds the semref, but boost_entities compares "space needle" with "space needle" and fails, so the entity loses its boost. Normalizing once in validate_and_prepare_term and in the query matchers would fix this.
  2. Related-terms alias index (storage/memory/related_terms_index.py, storage/sqlite/related_terms_index.py) stores and looks up raw text. An alias registered for "space needle" is missed when the user searches " Space\tNeedle".
  3. The two fuzzy-index update paths collect different terms. ConversationBase incremental updates add only entity names, topic text and action verbs. add_messages._collect_related_terms_for_fuzzy_index uses collect_entity_terms / collect_action_terms, which also include types, facets, subjects and objects. So related-term expansion depends on which ingestion path was used. This was already the case before #325.

Found while reviewing #325; left out of it to keep that PR focused on the storage indexes.

Ngôn ngữ chính
Python
Star
892
Fork
76
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/typeagent-py

Tất cả issue của microsoft/typeagent-py

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.