Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript query-able indexing of offline HTML docs

I posted a similar question earlier but don't think I explained my requirements very clearly. Basically, I have a .NET application that writes out a bunch of HTML files ... I additionally want this application to index these HTML files for full-text searching in a way that javascript code in the HTML files can query the index (based on search terms input by a user viewing the files offline in a web browser).

The idea is to create all this and then copy to something like a thumb drive or CD-ROM to distribute for viewing on a device that has a web browser but not necessarily internet access.

I used Apache Solr for a proof of concept, but that needs to run a web server.

The closest I've gotten to a viable solution is JSSindex (jssindex.sourceforge.net), which uses Lush, but our users' environment is Windows and we don't want to require them to install Cygwin.

like image 297
user1263226 Avatar asked Oct 25 '25 19:10

user1263226


2 Answers

It looks like your main problem is to make index accessible by local HTML. Cheat way to do it: put index in JS file and refer from the HTML pages.

var index=[ {word:"home", files:["f.html", "bb.html"]},....];
like image 141
Alexei Levenkov Avatar answered Oct 28 '25 08:10

Alexei Levenkov


Ladders Could be a solution, as it provides on the spot indexing. But with 1,000 files or more, I dunno how well it'd scale... Sadly, I am not sure JS is the answer here. I'd go for a custom (compiled) app that served both as front-end (HTML display) and back-end (text search and indexing).

like image 27
dda Avatar answered Oct 28 '25 09:10

dda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!