<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Troy,</p>
    <p>I did some debugging on this and found the following.</p>
    <p>The behavior of the multi word search is described in the code of
      swmodule.cpp<br>
    </p>
    <div
style="color: #cccccc;background-color: #1f1f1f;font-family: 'Droid Sans Mono', 'monospace', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span
    style="color: #6a9955;">          // First we check getRawEntry because it's the fastest;</span></div><div><span
    style="color: #6a9955;">          // it might return false positives because all the markup is include, but is the quickest</span></div><div><span
    style="color: #6a9955;">          // way to eliminate a verse. If it passes, then we do the real work to <b>strip the markup</b> and </span></div><div><span
    style="color: #6a9955;">          // really test the verse for our keywords.</span></div></div>
    <p>It seems that the second part (testing on the stripped markup)
      fails.</p>
    <p>I printf-debugged this part. The testBuf variable in case of
      Deuteronomy 28:15 contains the following string:</p>
    <p>CONSEQUENCES OF DISOBEDIENCE “LEV 26:14-43; JOSH 23:15; DAN
      9:11BUT IT SHALL COME ABOUT, IF YOU DO NOT LIT LISTEN TO THE VOICE
      OFOBEY THE LORD YOUR GOD, TO OBSERVE TO DO ALL HIS COMMANDMENTS
      AND HIS STATUTES WITH WHICH I CHARGE YOU TODAY, THAT ALL THESE
      CURSES WILL COME UPON YOU AND OVERTAKE YOU:<br>
    </p>
    <p>As you can see, the <i>testBuf</i> variable contains both the<i>
        header</i> as well as <i>cross references</i> as well as a <i>foot
        note</i>.</p>
    <p>The search algorithm as such is supposed to only return a match
      if the number of occurances related to the markup string matches
      the number of occurances of the stripped string. However, it seems
      that the <i>stripText()</i> is not behaving correctly here and
      therefore the stripped string contains markup content that it
      should not contain (header, cross-refs, foot-notes).</p>
    <p>Any pointers?<br>
    </p>
    <p>Best regards,<br>
      Tobias<br>
    </p>
    <div class="moz-cite-prefix">On 3/23/25 09:16, Tobias Klein wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:c37ad719-6d49-4a93-b3a6-47bda010d384@tklein.info">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hi Troy,</p>
      <p>is it intentional that the SWORD search also returns matches
        based on headlines or footnotes?</p>
      <p>E.g. when I have the following search configuration:</p>
      <p>Search type: Multi word search<br>
        Term: not listen Lord<br>
        Module: NASB<br>
      </p>
      <p>Among others, I get the result <b>Deuteronomy 28:15</b>.</p>
      <p>“But it shall come about, if you do <b>not</b> obey the <b>Lord</b>
        your God, to observe to do all His commandments and His statutes
        with which I charge you today, that all these curses will come
        upon you and overtake you: "<br>
        <br>
        In this particular case the term "listen" is not part of the
        Bible text, but rather only part of the footnote of "obey" (Lit
        <b>listen</b> to the voice of).<br>
        <br>
        I configured the respective SWMgr with Footnotes turned off:<br>
        this->_searchMgr->setGlobalOption("Footnotes", "Off");<br>
        <br>
        However, unexpectedly the search is still returning this verse
        as a result.<br>
        Similar behavior can be observed with search results matching
        headers.</p>
      <p>I'd rather not have search results based on footnotes or
        headers.<br>
        <br>
        Best regards,<br>
        Tobias<br>
      </p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
    </blockquote>
  </body>
</html>