Skip to content

Add search#451

Open
tenkus47 wants to merge 9 commits intodevelopfrom
ADD_SEARCH
Open

Add search#451
tenkus47 wants to merge 9 commits intodevelopfrom
ADD_SEARCH

Conversation

@tenkus47
Copy link
Member

@tenkus47 tenkus47 commented Feb 4, 2026

API change

  • Refactored endpoint

    • From: /text/title-search ( Old endpoint -> no need to delete for time being )
    • To: /search/knowledge-base
  • Added scope parameter to control the search mode:

    • all (default) — searches across title, author, and content , response are way smaller then the actual title and author and content fetched saperately.
    • title — searches only titles
    • author — searches only authors

Example requests

  • All:

    • /search/knowledge-base?query=...&scope=all
  • Title only:

    • /search/knowledge-base?query=...&scope=title
  • Author only:

    • /search/knowledge-base?query=...&scope=author
  • Content only: (this feature is not implemented since we already have a saperate endpoint that manages content only)
    which is /search/multilingual

    • /search/knowledge-base?query=...&scope=content

@tenkus47 tenkus47 requested a review from Lungsangg February 4, 2026 07:09
Base automatically changed from title-search to develop February 5, 2026 06:11
@Lungsangg
Copy link
Member

image

@Lungsangg
Copy link
Member

image

@Lungsangg
Copy link
Member

Lungsangg commented Feb 5, 2026

@tenzinsamten average response time for the scope all is around 2.5 second

image image

we have make the content fetch faster. still needs improvement though😁

Lungsangg and others added 2 commits February 5, 2026 12:47
…alt_incipit_titles to be optional in the text metadata model.
@tenkus47 tenkus47 closed this Feb 5, 2026
@tenkus47 tenkus47 reopened this Feb 5, 2026
… and imports to improve code clarity and maintainability.
…ng test cases

- Implement tests for `knowledge_base_search` with scopes: 'all', 'title', and 'author'.
- Validate responses for different scenarios including empty results and custom pagination.
- Ensure proper mocking of service calls to verify expected behavior in tests.
- Refactor existing tests for clarity and consistency in assertions.
@tenkus47 tenkus47 assigned tenkus47 and unassigned tenkus47 Feb 5, 2026
…proved type hinting and clarity. Update return type of knowledge_base_search in search_service.py to support union types.
…efault values for improved clarity and maintainability.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants