feat: implement full-text search with q parameter#1652
Open
GautamGunecha wants to merge 3 commits intotypicode:mainfrom
Open
feat: implement full-text search with q parameter#1652GautamGunecha wants to merge 3 commits intotypicode:mainfrom
GautamGunecha wants to merge 3 commits intotypicode:mainfrom
Conversation
- Add support for q parameter to perform full-text search across all string properties - Implement case-insensitive substring matching - Support nested objects and arrays in search - Add comprehensive test coverage for search functionality - Maintain backward compatibility with existing filtering Fixes the issue where q parameter was not working as expected. Users can now search across all string fields with queries like: - GET /posts?q=title - GET /transactions?q=Sushi Resolves search functionality that was documented but not implemented.
This was referenced Oct 11, 2025
|
Tested work well |
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.
Feat: Implement Full-Text Search with
qParameterProblem
The
qparameter for full-text search was documented and expected by users but was not actually implemented in the codebase. When users tried to search with queries likeGET /posts?q=title, they received empty results instead of filtered data.Root Cause
The current filtering logic in
src/service.tsonly handled:item=value)item_gt,item_lt, etc.)_embed,_sort, etc.)The
qparameter was treated as a regular field name, which didn't exist in the data, resulting in no matches.Solution
Implemented comprehensive full-text search functionality:
Features Added
q=sushiandq=Sushiboth workq=alimentfinds "Alimentação"Technical Implementation
qparameter inService.find()method#searchInItem()and#searchInObject()methods for recursive searchCode Changes
src/service.ts- Added search functionalitysrc/service.test.ts- Added test coverageTesting
Usage Examples
🔗 Related Issues
This fixes the commonly reported issue where users expected the
qparameter to work for full-text search but it returned empty results.Checklist
Impact