Jump to content


Photo

Multi-field "OR" Search not Working?


  • Please log in to reply
17 replies to this topic

#1 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 17 July 2014 - 04:42 PM

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...

 

Attached File  Screenshot 2014-07-17 17.19.28.png   24.06KB   0 downloads

 

...I get the following message

 

Attached File  Screenshot 2014-07-17 17.18.11.png   20.94KB   0 downloads

 

... 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."


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#2 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,695 posts
  • Gender:Male
  • Accordance Version:11.x

Posted 17 July 2014 - 08:23 PM

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


Accordance Configurations :
 
Mac : 2009 27" iMac                 Windows : HP 4540s laptop
      Intel Core Duo                          Intel i5 Ivy Bridge
      12GB RAM                                8GB RAM
      Accordance 11.0.1                       Accordance 11.0.1
      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#3 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 17 July 2014 - 08:37 PM

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

Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#4 Helen Brown

Helen Brown

    Mithril

  • Admin
  • 8,497 posts
  • Gender:Female
  • Location:heart in Israel
  • Accordance Version:11.x

Posted 19 July 2014 - 01:40 PM

This is the way the <OR> 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.


Helen Brown
OakTree Software

#5 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 19 July 2014 - 02:01 PM

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?

Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#6 Helen Brown

Helen Brown

    Mithril

  • Admin
  • 8,497 posts
  • Gender:Female
  • Location:heart in Israel
  • Accordance Version:11.x

Posted 19 July 2014 - 02:23 PM

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


Helen Brown
OakTree Software

#7 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 19 July 2014 - 06:58 PM

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.)


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#8 Helen Brown

Helen Brown

    Mithril

  • Admin
  • 8,497 posts
  • Gender:Female
  • Location:heart in Israel
  • Accordance Version:11.x

Posted 20 July 2014 - 12:03 AM

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.


Helen Brown
OakTree Software

#9 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 20 July 2014 - 07:12 AM

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?


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#10 Steve King

Steve King

    Gold

  • Active Members
  • PipPipPipPip
  • 427 posts
  • Gender:Male
  • Location:Hoddesdon, Hertfordshire, UK
  • Accordance Version:10.x

Posted 20 July 2014 - 10:35 AM

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.


Steve King Running Accordance 11.0.2 on:

Mac 10.9.5 (Mavericks), mid-2010 Macbook Pro, 4Gb RAM

IOS 8 (iPad 2 and iPhone 5)


#11 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 20 July 2014 - 11:29 AM

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.


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#12 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,695 posts
  • Gender:Male
  • Accordance Version:11.x

Posted 20 July 2014 - 11:41 AM

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


Accordance Configurations :
 
Mac : 2009 27" iMac                 Windows : HP 4540s laptop
      Intel Core Duo                          Intel i5 Ivy Bridge
      12GB RAM                                8GB RAM
      Accordance 11.0.1                       Accordance 11.0.1
      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#13 James Tucker

James Tucker

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 644 posts
  • Gender:Not Telling
  • Accordance Version:10.x

Posted 20 July 2014 - 09:56 PM

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. Accordance correctly applies this logic to the data, and what is leading some to misinterpret the search is the manner in which Accordance alerts the user a given token (word 1 or 2) does not occur in the data (based on the indexed lists of the tool or text). If the search were to run without any warning, Accordance would then need to alert the user that word 1 or 2 (<- see the logic there?) is null in the corpora or corpus.



#14 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 20 July 2014 - 10:21 PM

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?


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#15 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,695 posts
  • Gender:Male
  • Accordance Version:11.x

Posted 20 July 2014 - 10:24 PM

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


Accordance Configurations :
 
Mac : 2009 27" iMac                 Windows : HP 4540s laptop
      Intel Core Duo                          Intel i5 Ivy Bridge
      12GB RAM                                8GB RAM
      Accordance 11.0.1                       Accordance 11.0.1
      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#16 Daniel Semler

Daniel Semler

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,695 posts
  • Gender:Male
  • Accordance Version:11.x

Posted 20 July 2014 - 11:27 PM

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


  • Abram K-J likes this

Accordance Configurations :
 
Mac : 2009 27" iMac                 Windows : HP 4540s laptop
      Intel Core Duo                          Intel i5 Ivy Bridge
      12GB RAM                                8GB RAM
      Accordance 11.0.1                       Accordance 11.0.1
      OSX 10.9 (Mavericks)                    Win 7 Professional x64 SP1


#17 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,986 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 20 July 2014 - 11:41 PM

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.


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#18 James Tucker

James Tucker

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 644 posts
  • Gender:Not Telling
  • Accordance Version:10.x

Posted 21 July 2014 - 06:39 AM

 

"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.

 

The phrase I wrote was meant to say "and both" in which circumstance Word 1 and Word 2 are extant in the corpus. Accordance does clue you into the fact that one token is not extant in the corpus by displaying the dialogue box. Like I said, what your asking is that Accordance handle the null item differently. In that case, you are better off to run a search all.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users