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

Search Results returning verse not matching Search Term #9

Open
mommaroodles opened this issue Nov 3, 2024 · 2 comments
Open

Search Results returning verse not matching Search Term #9

mommaroodles opened this issue Nov 3, 2024 · 2 comments

Comments

@mommaroodles
Copy link

Search within Entire Bible of: "God blessed" IN THE SAME VERSE

Found 13 Occurrence(s)
in 13 Verse(s)
in 11 Chapter(s)
in 7 Book(s)

Not found at all in 31089 Verse(s) of the Bible
Not found at all in 1178 Chapter(s) of the Bible
Not found at all in 59 Book(s) of the Bible

And Ps 84:3 is also returned in the search results which it shouldnt be if the search scope is SAME VERSE

Psalms 84:3 Yea, the sparrow hath found an house, and the swallow a nest for herself, where she may lay her young, even thine altars, O LORD of hosts, my King, and my God.

@dewhisna
Copy link
Owner

dewhisna commented Nov 3, 2024

It's actually working as intended and this is where things get a bit tricky. The Search Scope of Same Verse (or any other Search Scope setting for that matter) only applies when there is more than one search phrase specified.

If you were to type God in one search phrase and add a second phrase with blessed, then Psalms 84:3-4 wouldn't be returned because both search phrases don't appear in the "same verse". However, you would get other results where the two aren't side-by-side in the verse or are even in a different order.

The way searching for a single phrase works in KJPBS is that the search itself is unbounded. KJPBS just looks for the individual words specified and doesn't check to see if they span verses or chapters or even entire books. All it knows is that the words are found together in the order given.

When you have multiple phrases, it then uses the Search Scope to compare the lists of results and look for an intersection, and if you have any result from both phrases intersecting the same verse, then it's considered "in the same verse". Meaning that the phrase can be either entirely in the verse or start or end in the same verse -- as long as they intersect the "same verse" somewhere. The phrase is considered "in a verse" as long as some part of that phrase intersects with that verse.

If you only have a single search phrase, the setting for Search Scope isn't used, since there's no results from multiple phrases to cross-check. That's why you are getting the Psalms 84:3 as a result. It's actually functioning as intended.

I guess what I need to add is an additional per-phrase option to actually constrain that specific phrase to a single verse, etc. At present, it doesn't have such an option and you have to look at the output to see if any of the results given cross a verse boundary. And it looks like there's a similar case with Matthew 5:8-9, Matthew 5:9-10, and Luke 6:20-21.

I think I actually already have this one listed in my "to do" book for KJPBS, but I will leave this ticket open to remind myself to add additional search options in a future version. For now, though, you'll just have to manually remove those 4 instances from the counts.

@i7sharp
Copy link

i7sharp commented Jan 12, 2025

Thank you, Donna!
Have a great day!!!

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

No branches or pull requests

3 participants