Welcome Guest, Not a member yet? Register   Sign In
Search facility without a database
#1

[eluser]the_unforgiven[/eluser]
IS it possible to do a search box without a database to just search through the files of html?

IF so how?
#2

[eluser]Kamarg[/eluser]
Sure it's possible but it'd be extremely slow for a website. You would essentially end up with something like the windows search in file feature. You'd have to open each file and look for matches to your search term. Given the nature of web applications, this is probably not going to work for any number of non-trivial files.

A better alternative is to build some sort of index of search terms in each file and check that instead of each file. Of course, at this point you're beginning to implement your own database and might as well just go with a prebuilt database solution that is optimized to do record searches.

tl;dr Yes but it's a bad idea.

Edit: your vs. you're is hard Sad
#3

[eluser]meigwilym[/eluser]
Implementing <a href="http://www.google.co.uk/sitesearch/">google site search</a> would be easier and better.

Mei
#4

[eluser]CroNiX[/eluser]
You can use the Zend Lucene library. There are tutorials on how to (easily) use Zend libraries. Very fast and full featured.
#5

[eluser]the_unforgiven[/eluser]
I'll leave it for now, and use a database....




Theme © iAndrew 2016 - Forum software by © MyBB