Enhance Typesense search functionality with advanced features#309
Draft
Pierre-VF wants to merge 1 commit into
Draft
Enhance Typesense search functionality with advanced features#309Pierre-VF wants to merge 1 commit into
Pierre-VF wants to merge 1 commit into
Conversation
Major improvements to the search functionality: ## Schema Enhancements - Added comprehensive searchable fields: website, license_url, forked_from, master_branch, readme_type, open_pull_requests, latest_update - Added all_languages as array field for multi-language projects - Added search_text field for optimized full-text search - Enhanced tokenization with custom separators and symbol handling - Added infix search capabilities for partial matching ## Advanced Search Features - Implemented fuzzy search with configurable edit distance - Added prefix and infix matching for better partial query handling - Enhanced hybrid search (keyword + vector) with configurable alpha weighting - Improved scoring with field-specific weights (name: 3.0, organisation: 2.5, etc.) - Added reranking for hybrid search results ## API Enhancements - Added /search/advanced endpoint with full parameter support - Added /search/autocomplete endpoint for search suggestions - Added /search/suggestions endpoint for rich suggestions with context - Enhanced /search endpoint with new parameters: fuzzy_search, hybrid_search, sort_by, sort_order, exclude_forks, exclude_inactive, min_last_commit_days ## UI Improvements - Added fuzzy search toggle in web interface - Enhanced search forms to preserve all search parameters - Improved result filtering and sorting options ## Backend Improvements - Batch indexing for better performance (100 documents at a time) - Enhanced filtering with support for multiple languages and licenses - Better handling of optional fields and null values - Improved date handling with timestamp conversions - Added comprehensive error handling ## New Functions - autocomplete(): Get search suggestions for partial queries - get_search_suggestions(): Get rich suggestions with project context - Enhanced search_with_query() with advanced options - Improved index_data_in_typesense() with batch processing ## Performance Optimizations - Combined search text field reduces need for multi-field queries - Batch document indexing reduces API calls - Optimized field indexing and faceting ## Backwards Compatibility - All existing functionality preserved - New parameters are optional with sensible defaults - Existing API endpoints unchanged in behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Typesense Search Functionality Enhancements
This PR significantly improves the search functionality of the web app with Typesense, adding advanced search capabilities, better performance, and enhanced user experience.
🚀 Major Features Added
🔍 Advanced Search Capabilities
📊 Schema Enhancements
🎯 New API Endpoints
🔧 Enhanced Existing Endpoints
🖥️ UI Improvements
⚡ Performance Optimizations
🔄 Backwards Compatibility
✅ Fully backwards compatible - All existing functionality is preserved
📁 Files Modified
🧪 Testing
✅ Syntax validation passed
✅ Import compatibility verified
✅ Function signature compatibility maintained
✅ New functionality accessible
🎉 Next Steps
To deploy these improvements:
The changes are ready for review and can be merged once approved.