[sword-devel] search oddities
Karl Kleinpaste
karl at kleinpaste.org
Thu Jan 8 13:07:23 EST 2026
This is mostly for Troy, if he's keeping track. We had some discussion
about this last April, but no resolution came of it.
I'm experimenting with some searches because results in Xiphos are
peculiarly inconsistent. I realized I can demonstrate what I see wrong
by use of diatheke alone.
I want to look for "prophetess." Minor variations in search term
determine whether it's successful or not. A plain search for the word
works fine:
diatheke -b NET -s lucene -k prophetess
Entries containing "prophetess"-- Judges 4:4Exodus 15:20 ; Nehemiah 6:14
; Isaiah 8:3 ; Luke 2:36 ; Revelation of John 2:20 ; II Kings 22:14 ; II
Chronicles 34:22 ; -- 8 matches total (NET)
If I precede the word with '+', the search goes dark.
diatheke -b NET -s lucene -k +prophetess
Entries containing "+prophetess"-- none (NET)
But if I now insist on a space following as well as the preceding '+',
now results are back.
diatheke -b NET -s lucene -k '+prophetess '
Entries containing "+prophetess "-- Judges 4:4Exodus 15:20 ; Nehemiah
6:14 ; Isaiah 8:3 ; Luke 2:36 ; Revelation of John 2:20 ; II Kings 22:14
; II Chronicles 34:22 ; -- 8 matches total (NET)
Not all words have this problem. Searching for "Jesus" works no matter
what I do, and in fact most words do. But there are words that are
somehow lost to search if the ordinary Lucene syntax of a preceding '+'
is applied, and then proper results are restored with an entirely
arbitrarily following space. I have no discriminant for what words work
vs fail.
The reason this matters to me is that Xiphos in simple sidebar search
presumes an AND search by tearing apart the offered search terms and
prefixing each with '+', whether or not there are multiple terms. This
makes a search for "prophetess" fail. But if I tack on a space, it works
again. In Xiphos advanced search, plain "prophetess" works fine.
There's clearly a funky bug lurking under the hood here.
Clues welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20260108/a1677d3a/attachment.htm>
More information about the sword-devel
mailing list