Advice Optimizing Search and Filters
Hi everyone,
I'm working on a database project for Commonwealth case law and need some advice on optimizing my search and filter functionality. Here's my current setup and questions:
1. Overview
- Approximately 5,000 legal cases
- Each case has a "searchSnippet" field (first 10,000 characters of the case)
- Cases also have the following fields: Jurisdiction, Year, CaseType.
- Current implementation uses Full text search with searchSnippet as the search field
2. Desired Functionality:
- Able to filter by jurisdiction( multiple or single jurisdictions)
- Filter by year range
- Combine filters and search (e.g cases in Belize and Barbados between 1990-2000 where the query is "Defamation in books"
3. Implementation Concerns
- Is a searchField with ten thousand characters scalable? Or does it quickly become inefficient?
- Is there a way to orchestrate a database call to achieve the desired functionality OR will I have to handle the filtering using some JavaScript OR is there some balance that your recommend
Appreciate any insigihts on what might be best practice here or any alternative approaches you can suggest. Thanks for the help
0 Replies