Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): enhance /search endpoint with flexible filtering and dynamic aggregations #155

Open
wants to merge 6 commits into
base: staging
Choose a base branch
from

Conversation

kouloumos
Copy link
Contributor

@kouloumos kouloumos commented Dec 18, 2024

This PR is the first step towards addressing #154, enhancing the Bitcoin Search API with several new features and improvements:

  • Search API Enhancements:

    • Support for filter operations (include/exclude).
    • OR logic via array values.
    • Dynamic aggregation fields and sub-aggregations.
    • Switching between default and coredev indices.

    For a deeper dive into the rationale and specifics of the new implementation, refer to Consolidate search functionality across products by enhancing Bitcoin Search API #154.

  • New /explore Page:

    • Replaces the existing /sources page, generalizing document exploration to include sources, authors, and tags.
    • Leverages the improved /search endpoint for a unified exploration experience.
    • Provides threaded, flat, and summary view modes for all content types.
    • Implements reusable data-fetching hooks for cleaner, modular code.
    • Serves as a testbed for the enhanced /search API.
  • Code Refactor:

kouloumos and others added 2 commits November 29, 2024 02:53
* feat(sources): add view modes and refactor Documents component

- Add threaded and combined summaries view modes for documents
- Filter out combined-summary documents from default view
- Break down Documents component into smaller, reusable components
- Add source metadata for available view modes (threads/summaries)
- Improve component organization and maintainability

* fix build error with more readable code

not related with the change but resulting in build error
* chore(banner): add boss banner

* chore(version): updated bdp-ui patch fix
Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bitcoinsearch-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 3:04pm

Add support for filter operations (include/exclude), OR logic via array
values, dynamic aggregation fields and sub-aggregations in the search API.
Allow switching between default and coredev indices. This consolidates
search functionality across products by making the Bitcoin Search API
more flexible while maintaining backward compatibility.
Introduces a flexible explore page that generalizes source exploration to handle domains, authors, and tags.
Consolidates API usage by leveraging the existing /search endpoint with aggregations instead of specialized
source endpoints. The new implementation uses reusable hooks for data fetching and provides threaded,
 flat, and summary view modes across different content types.
Removes /sources and /sourceDocuments endpoints and their associated hooks
now that their functionality has been consolidated into the /search endpoint
used by the explore interface.
The application was previously using URLs to fetch document content, but URLs
are not guaranteed to be unique across documents. Switch to using Elasticsearch
document IDs which are guaranteed unique identifiers. Update types, API
endpoints, and components to pass document IDs instead of URLs throughout the
content fetching flow.
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.

2 participants