Site Search is designed for websites with reasonably small content that do not have access to server side languages from which complicated search engine databases can be accessed. It also alleviates the alternative of including Google Search should you not wish to use it.
Site Search accepts input from your visitor, searched a database which you create and displays the results inside the current webpage.
There are 3 main components: a database file, search engine function and a HTML FORM. Ideally, each page on your website should contain the FORM component and remotely load both the Javascript database and function code. This will allow you to manage your search data by editing only one file.
Site Search accepts two input flags for
must and
not, and word pair literals in the form of two quoted words. A brief combination is as follows:
optional +must -not "one two" +"three four" -"five six"
The above search would produce a result only if there is a database entry containing the word
must and the word pair
three four but not if the word
not or the word pair
five six are present. Any database entry which also contains either
option or
one two will increase that entries score and move it higher in the results list.
Since this is a very simple script, invalid input will cause unusual results; most likely fewer or no results.
More
D10n first wrote Site Search and submitted it to
The JavaScript Source in April 2000. It was an extremely simple script, accepting only pure search terms and returning a basic database extract.
Colin Fiat has rewritten the search engine to include two search flags and a quoted word pair option. As soon as he figures out how RegEx really works, he expects to update the word pair to any quoted length string.
Colin Fiat Aug 2010