I apparently don't understand when the exact match operator would apply to a search

Page 1 of 1 (5 items)
This post has 4 Replies | 0 Followers

Posts 3017
Forum MVP
PetahChristian | Forum Activity | Posted: Thu, Jul 26 2018 1:40 PM

After a brief bit of insight about the = search operator, I assumed that "non-range/non-intersection" functionality could be extended to other searches.

For example, Jesus speaking to a group of disciples which include John, versus Jesus speaking only to John.

I tried these (originally the first two, but added the third) searches, but got the exact same results.

  • {Speaker <Person Jesus>} WITHIN {Addressee <Person John (son of Zebedee)>}
  • {Speaker <Person Jesus>} WITHIN {Addressee = <Person John (son of Zebedee)>}
  • {Speaker <Person Jesus>} WITHIN {Addressee ~ <Person John (son of Zebedee)>}

I've seen ~ vs = used for Sense searches, so I know the operator doesn't only apply to bible verse ranges. But in this case, there doesn't seem to be a difference between ~ and =. What am I missing?

Also, now I'm just curious... is there a way to find occurrences of Jesus only speaking to John?

Posts 7905
LogosEmployee

Search Extensions (which are introduced by curly braces { }) are, as the name implies, extensions to the regular search syntax and typically support none of the standard search operators.

https://wiki.logos.com/Search_HELP#Search_Extensions

More specifically, the {Speaker} and {Addressee} search extensions only support exact matches. Unless non-exact matches are specifically documented (e.g., * for {Highlight} or the special {Label} syntax), it's safe to assume it's only exact.

More fundamentally, the Biblical People dataset doesn't define relationships between groups (e.g., that John is a member of the Twelve Disciples, who are part of the group Israelites, etc.). (This has been suggested/discussed on the forums before, but I can't find a link right now.) Thus we don't currently have the data to support, say, a <Person ~ Twelve Disciples> search and find a reference to the group or any member of the group.

PetahChristian:
is there a way to find occurrences of Jesus only speaking to John

Your search is picking up false positives from when Jesus is speaking to John but is also speaking to at least one other person. For example, in Matt 17:7, Jesus’ speech is tagged with three addressees: Peter, James, and John. You can add "NOT INTERSECTS" terms to eliminate those matches, e.g.,

{Speaker <Person Jesus>} INTERSECTS {Addressee <Person John (son of Zebedee)>} NOT INTERSECTS {Addressee <Person James (son of Zebedee)>} NOT INTERSECTS {Addressee <Person Peter>} 

Posts 3017
Forum MVP
PetahChristian | Forum Activity | Replied: Thu, Jul 26 2018 5:22 PM

Thanks, Bradley, for the explanation!

So in the first search, {Speaker <Person Jesus>} WITHIN {Addressee <Person John (son of Zebedee)>}, is the "missing" operator understood to be the default one (~), the only-supported one (=), or none of the above? If I have to guess or try to lookup which one is being used, I'm already at a disadvantage in understanding a) how the program parses it, and b) which search the program actually executed.

I think it would also really ease the dependence on someone else having to explain, if the program would catch errors like this, since the ~ operator isn't supported and shouldn't be allowed. (Is there an open case for this issue?)

In this particular case, it was easy to notice that non-John Addressees were also being returned, but shouldn't we be concerned about when it is not as obvious that the search performed isn't the one that the user entered or expected?

Thanks again, Bradley!

Posts 7905
LogosEmployee

Background reading: "References" on the Search Help wiki https://wiki.logos.com/Search_HELP#id:1.2e_References and "Data Type References" in Logos Help: https://ref.ly/logosres/logos4help?hw=Advanced+Searching&off=4361&ctx=roximity+operators.%0a~Data+Type+References 

The missing operator is the default one, ~.

Note also that the operator goes within the angle brackets < >, i.e., it is part of the syntax for selecting a group of data type references. It functions similarly to wildcards in text terms. Just as lov* is a single term that matches many different words that start with "lov", <DataType Operator Reference> is a single term that matches many different references that are related to the specified Reference by the specified (or implied default) Operator.

<Person Jesus> is understood as <Person ~ Jesus>. Because the "Person" data type doesn't support ranges or hierarchy, the only possible meaning of ~ is exact equality. In a hypothetical future world that adds group hierarchies to the Biblical People dataset, you can imagine queries such as <Person subset Twelve Disciples>, <Person ~ A Man>, etc. (This is already possible, for example, with the <Sense> data type, which uses sense hierarchies from the BSL.)

PetahChristian:
if the program would catch errors like this, since the ~ operator isn't supported and shouldn't be allowed. (Is there an open case for this issue?)

Yes, there is a case for providing feedback when the user enters a "syntax error" in search. (In this scenario, it's not strictly speaking a syntax error to use <Person ~ Jesus> since there's no reason that's not technically possible. <Person is-mother-of Jesus> would be a syntax error because no "is-mother-of" operator is defined.

PetahChristian:
shouldn't we be concerned about when it is not as obvious that the search performed isn't the one that the user entered or expected?

The search that's performed is always the one that the user entered. 😀I'm not sure if we can figure out whether it's what the user expected/wanted; see this thread for an example: https://community.logos.com/forums/t/171180.aspx 

Posts 3017
Forum MVP
PetahChristian | Forum Activity | Replied: Thu, Jul 26 2018 7:25 PM

Bradley Grainger (Faithlife):
<Person Jesus> is understood as <Person ~ Jesus>. Because the "Person" data type doesn't support ranges or hierarchy, the only possible meaning of ~ is exact equality.

That's semantics. By saying that it can only return one result (since there is no support for ranges), the operator happens to produce the same result as an exact equality. Yet it's not the exact equality operator. Since the operator isn't meant to return "exact equality" results, it seems like an error.

Bradley Grainger (Faithlife):
In a hypothetical future world that adds group hierarchies to the Biblical People dataset,

While that would be nice, we haven't arrived there. Allowing the range operator to be used when it isn't supported and isn't doing what it is expected to do (simply because things might change in the future), adds unreasonable complexity in properly understanding use of the right operator for the right situation.

How else would people understand that a dataset presently doesn't support ranges, since the range operator is permitted?

We probably shouldn't place the burden on the user to realize, "Well, for this edge case, the operator doesn't mean or do what it usually means or does."

Bradley Grainger (Faithlife):
In this scenario, it's not strictly speaking a syntax error to use <Person ~ Jesus> since there's no reason that's not technically possible.

I'm not sure that we should take the position that it's not an error now, because it might not be an error in the future.

Anything might be technically possible, but it's not presently possible.*

*You'd know if Logos 8 will imminently change what's possible. Either way, thanks for your reply, Bradley, and for all you do to improve Logos!

Page 1 of 1 (5 items) | RSS