Counting matches

Ideas and suggestions about new features
Rubén Gómez
Posts: 106
Joined: Mon Mar 05, 2007 1:15 pm

Counting matches

Post by Rubén Gómez »

Hi Costas,

One thing I find very helpful when I perform a search is the ability to see the number of verses and hits found. For instance, if I search the KJV for "Zebedee", TW3 returns 11 matches. But this is only the number of verses. It would be great to have it return 12 hits in 11 verses, or something to that effect, since Matthew 4:21 contains two occurrences of "Zebedee". It would be even better if the Bible reference containing more than one hit could be flagged somehow.

Thanks for your consideration.

Rubén Gómez
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Post by csterg »

Thanks for the suggestion Ruben;
although this can be done (quite easily i think) there is an issue: when you search for a more complicated phrase for example "(a ANT b) OR (NOT c)", TW will just highlight all occurences of "a", "b" and "c" in the search results. I can think of 2 issues:
(a): you will need to have more than one counters, one for each "word"
(b): what it the meaning of counting the "c"s in a phrase like the above?

Of course, these can be considered as 'minor details' and just count all "words" as they are highlighted. What do you think?
Costas
Rubén Gómez
Posts: 106
Joined: Mon Mar 05, 2007 1:15 pm

Post by Rubén Gómez »

Costas,

I am not too sure your example of "(a AND b) OR (NOT c)" is very meaningful (why would I want to search anything that is not "c" in this particular OR search?). Maybe you could provide a "real-world" example :-)

Anyway, I will try to illustrate what I mean and refer to how 3 different commercial Bible programs approach this very issue. Let's take the KJV and a search like "(john AND james) AND (NOT peter)". TW returns 10 matches. Accordance finds 10 verses and 21 hits (i.e., counting all instances of "john" and "james" as hits). Logos does the same (10 verses and 21 occurrences). Finally, BibleWorks returns 10 verses, 3 forms and 11 hits ("3 forms" because there are three different terms in our search, and "11 hits" because "john AND james" [or "james AND john", since the search is not order-specific] appear 11 times -- Mark 3:17 includes 2 occurrences of "james" and 1 occurrence of "john").

Only BibleWorks has an option to "Include NOTs in Search Window hits" (in which case the same search would yield 10 verses, 3 forms, and 284 hits -- that is, all the words that are not "peter" and are not "james" or "john"), which the user can check or uncheck. To me, the important thing, whatever approach is taken, is that the "negative" part of the search (i.e., NOT peter) is not highlighted and/or counted in the search results/statistics.

I hope this makes sense.

Rubén Gómez
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Post by csterg »

Hello Ruben,
thank you for your suggestion, will do.

You said:
To me, the important thing, whatever approach is taken, is that the "negative" part of the search (i.e., NOT peter) is not highlighted and/or counted in the search results/statistics.
How would it be possible to highlight a 'NOT' part? The approach i can think is to 'highlighted all terms in all matched verses'. This approach will also ensure that 'NOT-ed' terms are not highlighted'.
For example, searching for "Peter" is the same as searching for "NOT NOT Peter". Both cases should highlight the word "Peter" in the search results and count the word as a hit each time it appears.

Can you think of other cases that this approach would fail ? (e.g. a term would be highlighted/counted when it shouldn't?)
Costas
Rubén Gómez
Posts: 106
Joined: Mon Mar 05, 2007 1:15 pm

Post by Rubén Gómez »

Hi Costas,

My point was that NOT searches should not be counted/highlighted. I think we are all agreed on that.

On the other hand, I am please to hear that you are willing to implement hit and verse counts for searches.

Thank you,

Rubén Gómez
Post Reply