Reputation: 1
I have a 120mb text file that has data in the form of
(entry name) | (entry data)
(entry name2) | (entry data2)
(entry name3) | (entry data3>)
and so on for a couple hundred thousand entries. Each entry is separated by a return
I want to create a search engine in html that scans the text file for matches based on the entry names and data.
For example: if I type in entry name2
or any string that is a subset of entry name2
or entry data2
into my search bar, the html page should return:
The entry data for
entry name2
isentry data2
It should also return matches for other entries such as entry name3
as well if the string entered into the search bar is a subset of both entry name2
and entry name3
.
Upvotes: 0
Views: 156
Reputation: 1651
You cannot achieve that using only HTML
.
What you're requesting is a capability available only with server side languages (especially if we're talking about a dynamic list). You should be acquainted with server-side languages (PHP etc) and learn how to do it with them.
Upvotes: 1
Reputation: 37369
HTML is a markup language, not a programming language. You can't do this in HTML. You'd have to use something like PHP (server side) or Javascript (client side). Also, you surely don't want to store all of that data in just a text file. A linear search with that many entries could take forever. Use some sort of DB.
Upvotes: 1