BUG: Search not working when question mark included

Page 2 of 2 (33 items) < Previous 1 2
This post has 32 Replies | 1 Follower

Posts 45
David Scott | Forum Activity | Replied: Sat, Feb 9 2013 5:25 AM

I recently wanted to search the Sermon on the Mount for "?" to find every instance where Jesus asked a question.  It did not work because of the role that "?" plays as a wildcard.  Is there a way to perform the search for a question?

Thanks,

David

Posts 25355
Forum MVP
Graham Criddle | Forum Activity | Replied: Sat, Feb 9 2013 5:50 AM

Hi David - and welcome to the forums

You can search for "interrogative pronouns" using a morph search

This might give you what you want - although it seems to give a couple of results which I wouldn't have expected.

Graham 

Posts 12167
Forum MVP
NB.Mick | Forum Activity | Replied: Sat, Feb 9 2013 6:01 AM

David Scott:

I recently wanted to search the Sermon on the Mount for "?" to find every instance where Jesus asked a question.  It did not work because of the role that "?" plays as a wildcard.  Is there a way to perform the search for a question?

I wouldn't trust translations to really find every instance where Jesus asked a question - probably Louw-Nida domains could cover this. 

However, to just quickly finde very ? charcter in a resource, I'd use the Ctrl-F text search.

Running Logos 9 latest (beta) version on Win 10

Posts 12167
Forum MVP
NB.Mick | Forum Activity | Replied: Sat, Feb 9 2013 6:20 AM

Dave Hooton:

NB.Mick:
While the questionmark works as a wildcard to find one character (counterintuitively even within phrases),

Logos does not index punctuation characters, and they are ignored during a search  e.g. ( ....) 

I trust that illustrates the purpose of a wildcard in a phrase (a wildcard character won't match punctuation!).

Dave,

I appreciate your explanation of wildcard functionality in searches - actually I think we should put some of this info into http://wiki.logos.com/Detailed_Search_Help under wildcards (and a remark under phrase search, that wildcards apply within phrases). The thread shows that not all of us immediately think of wildcards in the context of a phrase search for a long text containing a questionmark.

Howver, I still think the feature is buggy with respect to the interaction of a ? wildcard with omitted punctuation. Maybe even more:

Dave Hooton:
Now, whilst "lord? jesus christ" failed, a search for "lord* jesus christ" will succeed, giving the same results as "lord jesus christ" in this case.

okay, but what about "lord?jesus christ"? should find "Lord Jesus Christ" as well as "Lord, Jesus Christ". I expected the latter to fail (the bug from yesterday), but it gives zero results total.

EDIT:

maybe the bug is better explained with that wildcards ?  and * refuse to resolve for space. "lord*jesus christ" also won't work. I can take any phrase that gives a search result and replace a space with a wildcard and it won't find anything. Or add a questionmark to a word that gets a match - the hit will drop out. That's not only counterintuitive, that's simply wrong.

 

 

Running Logos 9 latest (beta) version on Win 10

Posts 9153
LogosEmployee

NB.Mick:

maybe the bug is better explained with that wildcards ?  and * refuse to resolve for space. "lord*jesus christ" also won't work. I can take any phrase that gives a search result and replace a space with a wildcard and it won't find anything. Or add a questionmark to a word that gets a match - the hit will drop out. That's not only counterintuitive, that's simply wrong.

Searches work by first breaking your query into "terms" and then finding articles in your resources that contain all those terms. If you've used Boolean operators or quotation marks to specify a phrase, then additional checks are made to make sure all the terms make a phrase, etc.

But the key insight into the process is that the terms you entered are first looked up in a global list of all terms in all resources. "lord*jesus" is considered one term (because it doesn't contain spaces), and it can only match individual terms in the term list. If "lordajesus" or "lordabcdefgjesus" were words, then they would match the wildcard. But since there aren't any words like that, the term matches nothing and the search fails.

The problem with allowing * to match any number of intervening characters is that "lord*jesus" would match from "Lord" in Gen 2:4 to "Jesus" in Rev 22:21, which seems fairly pointless. Or, if we only wanted it to match intervening punctuation characters, then that's already supported via a simpler syntax: "lord jesus".

Posts 9153
LogosEmployee

As you've discovered, the problem is that a '?' at the end of a search phrase is being treated as a wildcard character, which doesn't match itself (because punctuation is not indexed). I can see how this is quite unexpected and counterintuitive.

It seems like the best way to still allow wildcards (for the very small number of people who use them) as well as allow selected text -> Search this resource to work would be to relax the restriction on ? matching exactly one character, and allow a trailing wildcard at the end of a word to match nothing. That is, "it?" would now match just "it" (fixing the bug) as well as "its", "ita", "ite", etc. (wildcard matches).

 

Posts 15805
Forum MVP
Keep Smiling 4 Jesus :) | Forum Activity | Replied: Sat, Feb 9 2013 9:04 AM

David Scott:
I recently wanted to search the Sermon on the Mount for "?" to find every instance where Jesus asked a question.  It did not work because of the role that "?" plays as a wildcard.  Is there a way to perform the search for a question?

One option is searching for words often used in questions with Words of Christ tagging:

if, how, however, what, where, when, who, whoever, whom, why

Keep Smiling Smile

Posts 12167
Forum MVP
NB.Mick | Forum Activity | Replied: Sat, Feb 9 2013 9:24 AM

Bradley Grainger (Logos):
the key insight into the process is that the terms you entered are first looked up in a global list of all terms in all resources. "lord*jesus" is considered one term (because it doesn't contain spaces), and it can only match individual terms in the term list.

Thank you, Bradley, and you're right, this is a key insight. Especially regarding phrases I wasn't aware that you break them up and run them against the index database. To clarify: his means that wildcards currently can't match spaces (or whatever breaks up a term) and they can't produce hits over term boundaries, correct? 

Running Logos 9 latest (beta) version on Win 10

Posts 12167
Forum MVP
NB.Mick | Forum Activity | Replied: Sat, Feb 9 2013 9:32 AM

Bradley Grainger (Logos):

As you've discovered, the problem is that a '?' at the end of a search phrase is being treated as a wildcard character, which doesn't match itself (because punctuation is not indexed). 

I understand the problem, since due to broken-up lookup in the term database it won't find anything to match, neither the space character nor the beginning of the next word. 

Bradley Grainger (Logos):
It seems like the best way to still allow wildcards (for the very small number of people who use them) as well as allow selected text -> Search this resource to work would be to relax the restriction on ? matching exactly one character, and allow a trailing wildcard at the end of a word to match nothing. That is, "it?" would now match just "it" (fixing the bug) as well as "its", "ita", "ite", etc. (wildcard matches).

Yes, please!

Running Logos 9 latest (beta) version on Win 10

Posts 27264
Forum MVP
Dave Hooton | Forum Activity | Replied: Sat, Feb 9 2013 9:36 PM

NB.Mick:
To clarify: his means that wildcards currently can't match spaces (or whatever breaks up a term)

Spaces separate words, as does punctuation and footnote markers, so wildcards won't match spaces. That is why "lord ??? christ" will find "lord and christ" If the wildcard matched spaces the expression would match  "lord christ" (multiple spaces is the same as single space - it's just a separator).

NB.Mick:
and they can't produce hits over term boundaries, correct?

Yes. As explained above lord*jesus is a single term and won't match "lord jesus".

Dave
===

Windows 11 & Android 8

Posts 27264
Forum MVP
Dave Hooton | Forum Activity | Replied: Sat, Feb 9 2013 9:48 PM

Bradley Grainger (Logos):
It seems like the best way to still allow wildcards (for the very small number of people who use them) as well as allow selected text -> Search this resource to work would be to relax the restriction on ? matching exactly one character, and allow a trailing wildcard at the end of a word to match nothing

That will have consequences for when it is really wanted/intended. When picked up from selected text in a resource it should be parsed for question mark and discarded.

Dave
===

Windows 11 & Android 8

Posts 1471
Angela Murashov | Forum Activity | Replied: Tue, Oct 22 2013 2:50 PM

Bradley Grainger (Logos):
"it?" would now match just "it" (fixing the bug)

This will be fixed in 5.2 Beta 2. 

Posts 9153
LogosEmployee

Dave Hooton:

That will have consequences for when it is really wanted/intended.

We considered the implication of making "it?" now match "it" and decided that the actual use cases for a wildcard at the end of a word are rare, and that there is a workaround for advanced users who know what wildcard searching is (e.g., it? NOTEQUALS [nostem] it).

In most cases, the prefix of a search term before the question mark doesn't actually form a new word; for example, the search "baptis?" is unaffected, because "baptis" isn't a separate word, so it won't hurt to attempt to match it.

Dave Hooton:

When picked up from selected text in a resource it should be parsed for question mark and discarded.

The most common queries that contain question marks are (in order, according to our analytics)

  • Questions, such as: How did Zechariah die?
  • Morph queries (these don't really count as containing question marks internally, but do show a question mark in the UI)
  • Selected text from resources, such as: Who do they say that I am?
  • Typos/invalid queries, e.g., ? millenium
  • Actual wildcard queries

It wouldn't be sufficient to just strip question marks from selected text in resources that is sent to the search panel. Questions are typed in directly, or text is copied and pasted from web pages, etc.

This change fixes scenarios #1 and #3 above, while making #5 a little less convenient.

Page 2 of 2 (33 items) < Previous 1 2 | RSS