[sword-devel] SWORD search issue / search type multi Word
Tobias Klein
contact at tklein.info
Sat May 9 01:21:30 MST 2020
I have a finding regarding the search results.
Module: NASB
Search term: "faith Jesus"
Search type: multiWord (-2)
Search boundaries: Regular (without strict flag)
Among others I get Ephesians 2:7 and Ephesians 3:11 as search results.
Both contain the word "Jesus".
However, the respective second verse (Ephesians 2:8 and Ephesians 3:12)
which does contain the word "faith" is not returned as a search result
even though I would expect it here.
Best regards,
Tobias
On 5/5/20 8:12 AM, Tobias Klein wrote:
>
> Thank you, Troy! I appreciate it.
>
> I'm using this new search flag now and I'm getting exactly the results
> that I would expect.
>
> I think it's a good idea to make this configurable. I'm now also
> considering to add an option to my user interface to be able to toggle
> this option.
>
> Tobias
>
> On 5/5/20 2:00 AM, Troy A. Griffitts wrote:
>>
>> Dear Tobias,
>>
>> I have spent a bit of time documenting this a bit better in trunk and
>> have added a new flag (SEARCHFLAG_STRICTBOUNDARIES) to turn off the
>> default behavior to use a sliding window to find results.
>>
>> When performing a multiword (non-indexed) search with the NASB using
>> your 2 terms, I now get these hit counts:
>>
>> no flags: 86
>>
>> REG_ICASE: 93
>>
>> REG_ICASE | SEARCHFLAG_STRICTBOUNDARIES: 51
>>
>>
>> Hope this helps,
>>
>> Troy
>>
>>
>>
>> On 5/4/20 1:15 PM, Tobias Klein wrote:
>>>
>>> Hi,
>>>
>>> I have the impression that the SWORD multi word search is returning
>>> some results that actually do not seem to match the search term.
>>>
>>> For example when searching for the term "faith Jesus" in the NASB
>>> module I get 86 results.
>>>
>>> The first result that seems invalid is Matthew 9:28:
>>>
>>> ^28 When He entered the house, the blind men came
>>> up to Him, and Jesus said to them, " “Do you believe that I am able
>>> to do this?”" They said to Him, “Yes, Lord.”
>>>
>>> This verse matches only part of the multi word term, namely "Jesus".
>>>
>>> Matthew 9:29 is also returned as a result and this verse
>>> interestingly only matches the other part of the term ("faith"):
>>>
>>> ^29 Then He touched their eyes, saying, " “It shall be done to you
>>> according to your faith.”"
>>>
>>> What is happening here? My assumption would be that only verses
>>> containing both parts of the multi word term should be returned if
>>> the searchType is multiWord (-2). Is this a bug?
>>>
>>> The code can be found here:
>>> https://github.com/tobias-klein/node-sword-interface/blob/master/src/sword_backend/module_search.cpp#L121
>>>
>>> Best regards,
>>> Tobias
>>>
>>>
>>> _______________________________________________
>>> sword-devel mailing list:sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>
>> _______________________________________________
>> sword-devel mailing list:sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200509/bb3d7ef3/attachment.html>
More information about the sword-devel
mailing list