Searchlight - Frequently Asked Questions
I wouldn't ay that the following is a list of frequent questions.
They are, however, genuine.
Question
I am trying to install the 'Searchlight' on a client's web site and am a little
confused - the code calls for 'Search.class' however of the files required for
the applet, there only appears to be 'Search.exe'.
Answer
There's no file called Search.exe on my web site.
I can only think that your browser renamed the file when you copied it down.
Try again, this time refusing any attempt to rename the file.
If the filename does change then rename it.
You will have to copy down all of the class files and make sure that they are
named correctly on the web site otherwise it won't work.
If you're using Windows 3.1 or DOS then it won't let you use 5 character file
extensions.
This shouldn't be a problem as long as the full file name is used on the web
site.
Question
I searched for "Rankin!" but it did not find any instances although there are
many.
People come to my site specifically looking for Rankin!'s material.
How do I get the module to find it?
Answer
I've not encountered anyone with punctuation in their name before, Searching for
"Rankin" works where "Rankin!" fails.
Searchlight considers "!" to be the end of a word in the search files but not
in the search words.
I'll consider the implications of ignoring the punctuation in the search words
as well.
Then your search should work.
In the meantime, perhaps you could put a note on your search page saying don't
use punctuation in the search strings.
Question
The searching seems a might slow.
I'll try taking extra spaces and letters out of the index file.
Any other tips?
Answer
The problem is that Searchlight has to read your files across the network.
So, the smaller the better.
If your clients only want to search for, say, names, song titles or book titles
then you could use the INDEX File facility.
Create a file called PAGE.IDX and put the key words or phrases in it.
Then use a search.idx entry like:
PAGE.HTML HTML INDEX PAGE.IDX My page
Searchlight will search PAGE.IDX, which should be quick, but display PAGE.HTML.
If you can assume that your clients know which state they wish to search then
you can provide a search page for each state.
Each page will have its own configuration file, referencing its own set of
pages.
When a search is performed, only the relevant state will be searched, not the
whole country.
The best option for searching web-sites is to do so on the servers.
Unfortunately, your web service provide (and mine) don't provide this facility.
I hope that as more people use client searching (like Searchlight) then this
will encourage the web service provides to provide us with server side
searching.
It will reduce the loading on their network links and improve web performance.
If you find a good server side search utility then please let me know so that I
can recommend it to others.
Question
I get IO error message.
What does this mean and how can I change this message to another?
Answer
This usually means that the file you are searching for is missing.
You can change the "IO Error" message to, for example: "Something has gone
wrong" with the following bit of HTML:
<applet code="Search.class" ....>
<param name=badIOState value="Something has gone wrong">
:
:
<applet>
Question
... I have a problem.
It keeps telling me that search.class file is not found when I know that it is
in there.
Answer
The problem is that you have spelt "search.class", it should be "Search.class".
It is conventional to name Java classes starting with a capital letter.
Question
I see that only the class files are available for download, is it possible to
have a copy of the source code that made the class files?
Answer
In general, I'm not willing to give away the source.
However, if an official of your university makes a formal request, assuring me
that there will be no commercial gain then I may be willing to make it
available.
Question
Please let me know whether and how I might use Searchlight properly on a CD-ROM.
Answer
I'm happy for you to use Searchlight on CDROM.
You must keep me informed of your use of Searchlight and I will add your name
to the user list and link to your web site if you have one.
You must also put the logo and link on your search page.
There are a couple of organisations already using Searchlight on CDROM but I
havn't seen them.
I'm told that it can take some time to search a whole disc so you must be
careful how you use it.
If you have a lot of text to search you may want to implement several search
pages, each dealing with a subset of the data.
The configuration and use of Searchlight on CDROM is pretty much as described
for network use.
I can't think of anything else to add.
Question
The applet is unable to recognise &xxx as a character.
What should I do?
Answer
Searchlight does not recognise this method of encoding charaters.
I have added this to this list of possible enhancements.
In the meantime, you may like to consider this tip from Sister Janice:
At the very end of my document, I wrote a series of key words, consisting of the
accented words in the document, but without accents, very small and in white
letters, (same color as background) so they are invisible.
That way, Searchlight sees them and opens the file.
It works fine.
Question
When Searchlight runs, the browser crashes.
What should I do?
Answer
IE4 and IE5 sometimes crashes when running Searchlight.
The problem seems to have been due to an error in the browser.
However, the problem seems to have been fixed in Searchlight 5.0, where a new
compiler was used.
If you do see this problem the please
let me know.
For now I will leave the following text in this FAQ.
It shows an earlier answer.
It may help you workaround the problem if it should occur.
The Java code of Searchlight is interpreted by your browser.
This means that it is not possible for a fault in the applet to crash the
browser.
If the browser crashes then it is due to a fault in the browser.
You should report the fault to the browser authors.
I've had this tip from Andy Golley:
I was getting a problem trying to use Searchlight, similar to the one mentioned
on your FAQ page where the Java interpreter crashes the browser with a 'IEXPORE
caused an invalid page fault in module JIT.DLL' message.
I'm getting this in both Win95 and 98 with either IE4 or IE5.
After looking at the MS Knowledge Base I tried turning off the JIT compiler in
the 'Advanced' options for IE and the problem went away.
You can see more information in Microsoft Knowledge Base article
155163.
I am interested to know of your problems.
If I can reproduce them then I may be able to change the code to avoid the
browser fault.
Please remember, if the browser crashes then the fault is in the browser.
Question
Originally I had all the Searchlight files at the top level of the site, but I
want to put it all into a single folder.
I've restructured my .idx file as follows:
../index.html HTML FILE Home Page
../site_contents.html HTML FILE Site Contents
../news/index.html HTML FILE Latest News
../news//archive/mac.html HTML FILE Archived Mac News
but all is not well.
Does Searchlight have to be at the root level of the directory?
Answer
As applets may be loaded over a network, they are usually considered to be
untrusted code.
Web browsers restrict what untrusted applets are allowed to do.
For example, they are not allowed to read any of the files on client machines.
An applet is not allowed to access files from any system other than the one from
which it was loaded.
In practice, this seems to include files accessed via directories higher than
the one from which it was loaded.
This means that Searchlight has to be installed in the directory at the top of the search tree.
Question
The .idx file (search.idx) can get quite long.
Is there a way to truncate similar filenames, or even bundle files which are
under one directory?
Answer
No, each file has to be explicitly stated.
This was a deliberate decision.
It means that the webmaster has to think about what he searches, so searching
becomes more efficient.
For example, if he could specify all the files in a directory with an asterisk.
Then Searchlight could end up searching all sorts of files, e.g.: *.gif, *.jpg,
robots.txt, *.bak.
This is what I hope to avoid.
Question
I was wondering if and how I could use Searchlight to search material on other
sites.
For the filename, I just added the address.
It comes out with a Java error saying that it couldn't connect.
Answer
No, Searchlight can't search other sites.
Java security as implemented in browsers does not allow applets to read files
from sites other than the one from which they are loaded.
Question
... when you click on a found link and then go back to click on another, the
list is empty. Any suggestions?
Answer
You might consider using the "target" parameter to load the selected page into
another window or frame.
The applet will then stay on the screen and not be reset.