Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#346 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
databases, search

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
892
Forks
76
Merge medio
2 d 15 h
PR fusionados (30 d)
23

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/typeagent-py

Todos los issues de microsoft/typeagent-py

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.