Creating an efficient search with non-trivial boolean relationships

David Novick
David Novick Member Posts: 43 ✭✭
edited November 2024 in English Forum

So, I just sat here looking at the latest release notes, and once again marvel at how the team at Logos/Faithlife continues to expand the metadata tagging and associated search/query facilities that are in Logos. My ability to search my library in complex ways just grows and grows. Thank you.

That said, I still find times where it doesn't seem like Logos will allow me to do what I want wrt searching. Of course, I freely acknowledge that in spite of having used Logos since the 2.x days, I don't know it all. So, I may be ignorant of something that is already present. 

Most of what I find I can't do seems to center around building searches that are dependent on previous search results or those that could easily be defined with boolean expressions that are not expressable with the Logos search syntax. Let me provide a prototypical example:

- I perform a search "X greek lemma WITHIN 0 WORDS Y english word" within my tagged KJV. This works fine.

- Now, I want to redo my search to include all of those results that would be included with a search on only the first (greek lemma) part of my search above, but NOT those in the second (english word) part. 

- It seems like what I want from a boolean expression standpoint is term 1 INTERSECTION NOT term 2.. Basically, I want the results that do not meet the 2nd term's criteria (including the WITHIN 0 WORDS constraint), but do meet the first term's.

- I can get close by doing first term ANDNOT second term...but this doesn't enforce the "WITHIN 0 WORDS" constraint on the atomic search terms.

Similar to this is just a general capability to build a new search off of an already executed one. For example, in my steps above, I could perform this query by first doing a search on "X greek lemma" and then executing a filtering search that refines those results to not include those in the search "term 2" (but still matching the term1 criteria.). Basically, instead of running my search against a resource or range within a resource, I run it against previous search results.

Again, I may be missing something, or thinking about the problem incorrectly, but it doesn't seem like I can do such things with the current feature set. Am I wrong? 

Dave

Comments

  • MJ. Smith
    MJ. Smith MVP Posts: 55,539

    Is what you want accomplishable via the set relationship merges of Passage Lists generated from the Search Save as Passage List .... yes I know one can prove this is not 100% correct but ... You can also limit a search to a Passage List if I recall correctly giving another recursive option.

    Orthodox Bishop Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."; Orthodox proverb: "We know where the Church is, we do not know where it is not."

  • David Novick
    David Novick Member Posts: 43 ✭✭

    You know what? That certainly took care of my prototypical example...and will handle many of the others I had in mind...for the most part.

    Of course, it still doesn't enforce the lemma = translation relationship in my example, and so I might exclude some results that I shouldn't. However, I think it is close enough to handle most of the scenarios I had in mind.

    Its funny. I knew about the merge functionality, but had forgotten about it. Thanks much for reminding me.

  • Dave Hooton
    Dave Hooton MVP Posts: 36,339

    I perform a search "X greek lemma WITHIN 0 WORDS Y english word" within my tagged KJV. This works fine.

    - Now, I want to redo my search to include all of those results that would be included with a search on only the first (greek lemma) part of my search above, but NOT those in the second (english word) part. 

    Because of the special nature of "0 WORDS" (same location) you could substitute ANDEQUALS e.g. lemma:διασπορά ANDEQUALS Jews  (in the NLT). The occurrences NOT translated "Jews" is found using lemma:διασπορά NOTEQUALS Jews

    Dave
    ===

    Windows 11 & Android 13

  • DMB
    DMB Member Posts: 14,633 ✭✭✭✭✭

    When I wrote my own Bible software (and there's many forumites that can do that), very quickly, I added three features that save loads of Bible study time:

    - Letting a user check-off desired items in a search result (since most users can't know exactly what is going to show up). And then dumping anything not checked-off.

    - Running a new search within previous search results (as narrowed down by the user above)

    - Attaching notes from search results directly (either a single note for all entries, or a note for each search result).

    By stepping thru a search, manually culling-out, and then notes, it really simplifies the process. And not just for Bible text.

    "If myth is ideology in narrative form, then scholarship is myth with footnotes." B. Lincolm 1999.