Skip to content

bug: Several real issues in ks_search_tool.py — inconsistent result schema, dead code, deprecated API usage #73

@QuantumByte-01

Description

@QuantumByte-01

Issues in backend/ks_search_tool.py

  • Inconsistent result schema: general_search returns id/title_guess/content, general_search_async returns _id/title/description — causes silent missing fields downstream
  • Silent empty return: global_fuzzy_keyword_search returns [] with no warning when datasources_config.json is missing
  • Only top fuzzy match used: search_across_all_fields drops all matches except matches[0]
  • Dead stub classes: BaseModel and Field at the top are unused leftovers from removing Pydantic
  • Deprecated API: asyncio.get_event_loop() inside async context — use asyncio.get_running_loop()
  • print() instead of logging: 10+ print calls, can't be silenced in production

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions