JavaScript Indexer and Search Engine

T

Tony Cheroke

Someone was looking for a way to add a search engine to their
website w/o installing a database. This program does it with a
javascript database file:

<http://www.iuliu.as.ro/projects/javascript/search.html>
direct download:
<http://www.iuliu.as.ro/projects/javascript/jsind.zip> ~81KB

<quote>
Description:
On servers which don't admit server-side scripts (PHP/ASP/etc..) if
you wish to add a search engine you have 2 options:
-To use a dedicated external engine.
-Or to use a script that runs on client side.
The second option has the advantage that you can use the search
engine offline (on html help, tutorials, etc..).
JavaScripts cannot search through directories on the server, so you
must make a file which contains a database with the words you like
to be searched for.
I made a console program (JavaScript Indexer) which scans a
specified directory and all subdirectories for "*.htm*" and "*.txt"
files and automatically indexes the web site, creating a database on
a js file.
It writes the search function into the same file. So all you have to
do is to add few lines to the web page and you have your search
engine running.
<snipped a lot from page>
....
License:
This program is FREEWARE.
</quote>

This could be used to create a search for books by creating an HTML
file with just the information required (Author, Title, Price, etc.)
and using this program to index just that one HTML file, rather than
an entire website.

HTH,
Tony
 
J

John Fitzsimons

On Fri, 16 Apr 2004 20:17:35 -0000, Tony Cheroke

Hi Tony,
Someone was looking for a way to add a search engine to their
website w/o installing a database. This program does it with a
javascript database file:

This could be used to create a search for books by creating an HTML
file with just the information required (Author, Title, Price, etc.)
and using this program to index just that one HTML file, rather than
an entire website.

Don't know how one would use the program to index just the one file
BUT the above certainly looks worth checking out. I particularly like
the option to alter the output layout.

Thanks for the reference. Much appreciated. :)

Regards, John.
 
M

MLC

venerdì 16/apr/2004 _Tony Cheroke_ ha scritto:
Someone was looking for a way to add a search engine to their
website w/o installing a database. This program does it with a
javascript database file:

<http://www.iuliu.as.ro/projects/javascript/search.html>
direct download:
<http://www.iuliu.as.ro/projects/javascript/jsind.zip> ~81KB

Thanks Tony, very nice find!
I didn't make a request here, though I was looking for a similar capability.
This weekend I'll work to put it on my site.
Have you already used it? I ask because I've read that the contents (local
and on the web) must be identical, but I think it wouldn't matter if I have
some extra file (here or there) that I don't want to be indexed.
 
T

Tim Weaver

MLC said:
venerdì 16/apr/2004 _Tony Cheroke_ ha scritto:


Thanks Tony, very nice find!
I didn't make a request here, though I was looking for a similar
capability. This weekend I'll work to put it on my site.
Have you already used it? I ask because I've read that the contents
(local and on the web) must be identical, but I think it wouldn't matter
if I have some extra file (here or there) that I don't want to be
indexed.

E' is cool. And your Dialog section is very good. :)
 
T

Tony Cheroke

On Fri, 16 Apr 2004 20:17:35 -0000, Tony Cheroke

Hi Tony,
Don't know how one would use the program to index just the one
file BUT the above certainly looks worth checking out. I
particularly like the option to alter the output layout.

Thanks for the reference. Much appreciated. :)

Regards, John.
Hi John,

I thought you'd like this. Take a look at the ini file for the
program; one of the items indicates you could put all your data in a
text file rather than an HTML file:

;To scan for htm* or txt files. 0=false, 1=true
ScanForHTML=1
ScanForTXT=0

What I did was to use the program to index just a few of the files I
wanted searchable, so I placed those files in temp folder and ran
the program on just those files with batch file:

example:
jsind.exe <folder> <base URL of website>

I used:
jsind.exe c:\burn cat/

so that the URL would just be <a href="cat/xxxxx.html>XXXXX</a> in
the resulting data base. I imagine you don't really have to specify
a URL at all if you have a text file with your data.

Tony
 
T

Tony Cheroke

venerdì 16/apr/2004 _Tony Cheroke_ ha scritto:


Thanks Tony, very nice find!
I didn't make a request here, though I was looking for a similar
capability. This weekend I'll work to put it on my site.
Have you already used it? I ask because I've read that the
contents (local and on the web) must be identical, but I think it
wouldn't matter if I have some extra file (here or there) that I
don't want to be indexed.

Hi Maria,

No, I haven't used it on an active website, just some 300 files on my
local disk. But, it works as advertised.

Tony
 
M

MLC

domenica 18/apr/2004 _Tony Cheroke_ ha scritto:
Hi Maria,

No, I haven't used it on an active website, just some 300 files on my
local disk. But, it works as advertised.

Hi Tony,

I've already put it on my site and it works like a charm.
I don't know however why I wasn't able to make it read my changes in the
JSInd.ini and default.inc files, therefore I changed a bit the search.js
file and it works as I want with that file only: in fact I've uploaded only
the search.js file.

Thanks again for this great find.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top