Problem/Motivation
The Bible module’s search currently does not support robust keyword search for all translations, especially those with embedded Strong’s numbers (e.g., KJVSN). Users cannot search for verses containing multiple keywords (AND logic), and keywords may not match if Strong’s tags are present in the verse text. This limits the usefulness of the search feature for study and comparison.
Steps to reproduce
- Import a translation with Strong’s numbers (e.g., KJVSN).
- Attempt to search for a keyword present in a Strong’s-tagged verse (e.g., “truth”).
- Attempt to search for multiple keywords (e.g., “truth mercy”).
- Observe that results are incomplete or missing for tagged translations, and combined keyword search is not supported.
Proposed resolution
- Enhance the search logic to support both single and combined keyword (AND) search.
- Strip Strong’s tags (<H####>, <G####>) from verse text for keyword matching, so searches work for all translations.
- Require all entered keywords to be present in the verse (AND logic).
- Maintain Drupal coding standards and compatibility with all translations.
Remaining tasks
- Review and test the patch in various environments and with different translations.
- Confirm that both single and combined keyword searches return expected results.
- Document the new search behavior for users and maintainers.
User interface changes
- No UI changes are required. The improved search logic is available via the existing search interface.
API changes
- The search endpoint now supports combined keyword (AND) search and matches keywords in both raw and tag-stripped verse text. No breaking changes to the API structure.
Data model changes
- No data model changes are required. All improvements are at the query and logic level.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | bible_search_strongs_patch.diff | 0 bytes | dbt102 |
Comments
Comment #2
dbt102 commentedThis patch implements robust keyword and combined keyword (AND) search for all Bible translations, including those with embedded Strong’s numbers. It ensures that search works as expected for both plain and Strong’s-tagged texts, and supports searching for multiple keywords at once. The patch follows Drupal coding standards and is ready for community review and testing.