Jump to content

Multi-field "OR" Search not Working?


Abram K-J

Recommended Posts

In 10.4.3 using Mavericks, when I do a two-field search with the OR connector for "shepherd" (Content) OR "Psalm 23" (Scripture) in both Sacred Bridge and Carta's New Century Atlas...

 

post-31802-0-29613700-1405633120_thumb.png

 

...I get the following message

 

post-31802-0-04699900-1405633093_thumb.png

 

... even though just searching "shepherd" by itself in the Content field returns plenty of results in each of those modules.

 

Is this a bug? I've gotten this kind of "OR" search to work plenty of times before, but my "OR" above seems to be functioning more like and "AND," given me the null search results. Am I missing something?

 

The same search combo worked just fine in PhotoGuide 3, where the same "OR"-connected, multi-field search returned results (as expected) for places where just "shepherd" appeared tagged as "Content."

Link to comment
Share on other sites

Looks like the error dialog indicating that the individual search for Ps 23 is not successful is taking precedence over the returning of the other results that you would otherwise get. The reason the photo guide query worked is that Ps 23 appears in the tool. Hmmm.... it feels like a bug to me but it may be just the way the precedence is setup. If you put in a word that does not appear in SB (I chose dingo) OR'd with a verse ref that does, then you get a popup dialog to select words from. So it works both ways.

 

Thx

D

Link to comment
Share on other sites

Thanks for checking (and confirming). Unless I'm misunderstanding "OR," or have something off in my setup, it does seem like a bug.

Link to comment
Share on other sites

This is the way the command works in a single field as well. It brings up the dialog if one of the terms cannot be found. It may not seem logical, but programmatically it is.

Link to comment
Share on other sites

Thanks for the reply, Helen. This was probably only implicit in my post above, but what made me think it's a bug is that even after I click OK in the warning dialogue, it won't conduct the search to find the hits for the one item that does have occurrences. So the lack of a hit for one term is essentially making the OR search not "work," at least not in the way one might typically think it would. Is this expected behavior, too?

Link to comment
Share on other sites

Well, yes. Unless you correct the term that isn't found, it cannot conduct the search.

Link to comment
Share on other sites

Hmmm... okay. I have (obviously) missed till now that it functions this way.

 

Helen: Would you/the programmers consider an adjustment to the programming logic here for some future revision? I can only speak for myself and what I expect/would find useful, but if I'm searching a tool for (Content) shepherd <OR> (Scripture) Psalm 23, what I'm after is quickly getting to occurrences of either/each of those queries, run essentially at the same time in one fell swoop. In such an instance, I don't really need to know whether one or the other doesn't occur--I would just use a single search field for that term if that's what I were after.

 

Or to put it as a question: what is the intended benefit of that dialogue box? (As opposed to just having Accordance return the results and letting me sift through them, just as it does when each of the terms in an <OR> search does occur.)

Link to comment
Share on other sites

To me it's clear that the benefit is that you don't have to search pages and pages of results to be sure that one of your terms isn't there.

Link to comment
Share on other sites

Okay--maybe we can agree to disagree on the logic/thinking in this instance. My point is just this: when I'm doing an OR search, I'm really trying to run two searches at once, and only am interested in the whole set of final results, not whether either of the component parts has been found by itself. (I'd run a single field search for the latter.) I don't know how others think about this.

 

At any rate, in the Help files, you have <OR> defined as: "X <OR> Z finds verses where either X or Z is present." The warning dialogue in this case--whether it's a bug, per se, or not--is preventing Accordance from pulling up results for an OR search, as defined above.

 

What about keeping the warning dialogue, if that seems important, but allowing a click on OK to then take the user to the actual results, so that multiple re-workings of the search don't have to be re-run?

Link to comment
Share on other sites

It is consistent with the use of <OR> in the search bar. If you search for green <OR> dingo in the ESVS it will come up with a dialogue box asking you to change the word 'dingo' and giving you a list of words to choose from. Same thing happens on tools.

 

Whether you think that is right or not is a moot point but it is consistent across the software.

Link to comment
Share on other sites

Steve: yes, it's consistent with the use of <OR> in the search bar, but what is not consistent in Accordance is that results are returned for an <OR> search if both of the terms appear, but no results are returned (only a warning dialogue box) if one does not appear. This means that an OR search does not work (i.e., return actual OR results) in the event that one of the search terms does not appear in a module.

 

Whether I think it's right or not is a moot point only insofar as this is not strictly a bug (so an admin can feel free to move this to a feature request forum). But the above outcome is at odds with the actual definition (even how Accordance defines it) of "OR."

 

At the least, if Accordance really wants to keep that dialogue box, one should be able to still click past it to get real search results easily.

Link to comment
Share on other sites

A couple of times yesterday I thought to chime in on this one again. Helen's is exactly the kind of answer I was thinking about when I said in my response above "Hmmm.... it feels like a bug to me but it may be just the way the precedence is setup.". Accordance's view appears to be that if a particular search element specifies a value that is known not to exist, then the entire query cannot be run. I might suggest that to know that, the query has been run but that's not necessary of course to get to this point. Query execution appears to have two parts - one validating the input arguments (not merely syntax, but whether values specified exist in the resource) and the next actually retrieving hits. For small databases and relatively simple queries this is a tractable problem and provides some benefits. I come at Accordance from a SQL RDBMS background and cases like this catch me out because my expectation initially is like yours Abram. In that domain empty results are considered a result, so one can search for something that is not present in a table and you will simply get no rows back.

 

I have also been caught out before on this issue in scripting. The highly interactive nature (and GUI nature) of Acc sometimes causes problems for scripting. If I don't know beforehand that a script will produce valid queries against Acc I can have to cope with message boxes like these ones, which is well-nigh on impossible (at least for me on Mac) unless an app has been coded for scripting interaction.

 

So I can see utility for you case but I do not know how hard it would be to implement, how deeply embedded the prevailing paradigm is. I could imagine an explicit search modifier like FUZZY modifies a search to permit inclusion of more or fewer words. A preference would work of course, but would not be so flexible. Perhaps Flex, Exact, Allow Missing might be another way to achieve this.

 

I don't know the code, and the above is black box based assessment which is always tricky without a slew of testing. But this looks to me like a paradigm issue and it may not be straightforward to implement.

 

Thx

D

Link to comment
Share on other sites

It seems like we may be missing each other here, or using "OR" in different senses/languages. James, did you mean that "but not both" is included in the logic of "OR"? That's not right, so maybe I misread you.

 

From a symbolic logic standpoint (or: just think of a truth proposition), any one (or more) of the following make "X or Y is true" obtain:

 

*X is true

*Y is true

*X and Y are true

 

I believe this third assertion is contra the "but not both" you mentioned. X can be true and Y can be true, and in such a case, "X or Y is true" also obtains. But I don't know what that has to do with this case in Accordance.

 

The only thing that makes "X or Y is true" not obtain is if "X is not true" and "Y is not true."

 

"X is true and Y is not true" (the search that led to my post here in the first place) still makes "X or Y is true" obtain--this is why I continue to think Accordance should show at least some results, i.e., actually run the search, since the OR operator/relationship properly obtains, regardless of null results for one item.

 

However, maybe the rub is in applying the definition of "OR" from philosophical/symbolic logic to Accordance. I.e., maybe it's a different kind of "logic." (I'm not a programmer.)

 

And maybe "truth proposition" and "Accordance search query" are not comparable in the sense I am comparing them above. Is that perhaps why it's programmed as it is?

Link to comment
Share on other sites

I don't think the processing of the <OR> operator itself is at question now, though obviously the post began there. When the query is runs its results are fine. The question rather hinges on whether it is appropriate to run the query when one of the terms is known not to exist in the search text. And from there it is a choice as to whether one needs to notify the user of the absence of a term in the corpus or not. Accordance, for good reasons chooses to do prevent the search being run, and notify the user, but there are use cases this impedes.

 

Thx

D

Link to comment
Share on other sites

Actually I've just reread this James : "Accordance parses the operator correctly. If one were to draw a Venn Diagram of the Logic of OR, then yes a string of WORD 1 OR WORD 2 is those occurrences where either word 1 or word 2 occur, but not both.". This is the description of an XOR operation (almost) not an OR. A logical OR operation is either one or the other or both. XOR is either one but not both (and in fact not neither either). Common usage of the word "or" (not the logical operator) is as you describe, the difference of course leading to the old joke "Would you like tea or coffee ? Yes". But as I said I don't believe that's really the issue here.

 

Thx
D

  • Like 1
Link to comment
Share on other sites

Daniel: you had me at "not neither either"!

 

And in your post above that, I think you've framed the question(s) well. Thanks for weighing in.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...