[sword-devel] Chinese Bible search program

Jerry Hastings sword-devel@crosswire.org
Wed, 13 Dec 2000 12:36:23 -0700


At 12:55 PM 12/12/2000 -0800, Joel Mawhorter wrote:

>Any other suggestions that people have, especially regarding searching would
>be appreciated.

I suggest you use two forms for searching, with a button on the forms to 
switch between them. One from would be for those that like to use boolean 
searches and understand them. The other form would be for those that think 
"and" (not "AND") when they mean "OR", and for those that can't remember 
what symbols to use. This second from could have a templet with a lot of 
drop down options separated by text such that when filled out you have 
produced a sentence with clear intent. In this form avoid words like "AND" 
and "OR" because the intent to many will not be clear. Instead, use phrases 
like "may contain", "must also contain", "must not contain", "only one of", 
"any of", "all of", "words", "strings", "phrase". The form should have the 
basic templet repeated a few times. You end up with a search that looks 
something like this:

Produce search results where:
results         may contain         any of   the 
following    words:  writings law
results also  may contain         any of   the following   strings:  book
results also  must not contain   any of   the following    words:  moses
results also  ...                        ...         the 
following    ....     :

That search would hit on "writings", "law", "book", "books" and "book*", 
but not where "moses" is found.

To do the search treat each line as a separate search. Do the "may" lines 
first.  Take the result of one "may" line and OR it with the result of the 
next "may" line. OR that result with the result of another "may" line. Take 
the result after all the "may" lines and AND it with the results from a 
"must" line. (If the "must" is a "must not" then NOT the result of the 
"must not" first--search for moses and then NOT the result before 
ANDing)  Take that result and do likewise with the next "must" line.

It there are not any "may" lines use the results of one of the "must" lines 
in place of the results from the "may" lines, but NOT a "must not" result 
first if using it in place of the "may" lines.

Jerry