Jump to content

Search and range oddity


mgvh

Recommended Posts

Let's say I want to find

A <AND> (B <OR> C)

That search runs fine.

Now I want to limit it to a single Bible book, so I do:

A <AND> (B <OR> C) [RANGE Mark]

 

That returns an error message: "Cannot have parentheses within parentheses within a phrase."

BUT

if I reorder:

[RANGE Mark] A <AND> (B <OR> C)

then the search runs fine.

 

Anyone explain the logic why the one search doesn't run and the other does?

Thanks! Mark

Link to comment
Share on other sites

Assuming operator precedence issues, and not directly answering the question as ask (because I can't yet :) ),

 

Have you tried A <AND> [RANGE Mark] (B <OR> C) 

or A <AND> ((B <OR> C) [RANGE Mark])  ?

 

Basically, to what element do you wish to apply the [RANGE Mark]

 

Thx

D

Link to comment
Share on other sites

Actually I think it might be simpler than that. I think, having now done those tests, that the parser may think that once it sees an operator like <AND> or <OR> that things like [RANGE ] are invalid.So where it is at the end (or indeed in between) it gets interpreted as a part of a phrase. At that point some other rule kicks in and says you cannot have <OR> in the middle of a phrase. Note, I am not getting quite the same message as you report. For :  αγαπη <AND> (κυριος <OR> θεος) [RANGE mark]  

 

I get 

 

post-32023-0-15674400-1585713032_thumb.png

 

It doesn't need to be a command at the end.

 

 αγαπη <AND> (κυριος <OR> θεος) σάρξ

 

fails the same way.

 

Try changing the <OR> to a comma. That seems to run in my example.

 

Thx

D

  • Like 1
Link to comment
Share on other sites

Mark,

 

Basically, whenever combining 2 or more boolean operators (AND, OR, NOT, even WITHIN, FOLLOWED BY, etc.) it can get ambiguous what is actually desired by the user.  For example, what if I searched for Adam Eve God.  Does God also have to be within 5 words of Adam?  So, I think whenever the search gets "too complicated" we just block it and say to use a construct.  It seems the [RANGE] command is trigger it, but honestly its because you had a wishy-washy search anyway.

 

Since all you want the multiple booleans for is the command, I highly recommend you use the non-wishy-washy search of:

 

A (B, C)

  • Like 1
Link to comment
Share on other sites

Mark,

 

Basically, whenever combining 2 or more boolean operators (AND, OR, NOT, even WITHIN, FOLLOWED BY, etc.) it can get ambiguous what is actually desired by the user.  For example, what if I searched for Adam <WITHIN 5 Words> Eve <AND> God.  Does God also have to be within 5 words of Adam?  So, I think whenever the search gets "too complicated" we just block it and say to use a construct.  It seems the [RANGE] command is trigger it, but honestly its because you had a wishy-washy search anyway.

 

Since all you want the multiple booleans for is the <OR> command, I highly recommend you use the non-wishy-washy search of:

 

A <AND> (B, C)

 

Hey Joel,

 

While I understand that, I've always thought it a little unfortunate that parentheses do not resolve the precedence issues here. A <AND> (B <OR> C) should really be as unambiguous as A <AND> (B, C) and adding additional parens ought to be able to make additional elements like RANGE unambiguous in their application also.

 

Admittedly, issues with regarding to distance between fragments would have to be dealt with for sure, but what is expressible in a construct is in theory expressible in a command line construct.

 

Thx

D

Link to comment
Share on other sites

Thanks, Joel and Daniel! Using a comma instead of the <OR> does the trick. I was unaware of using the comma for OR. That's good to know.

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