-
Indexing Search
Hello,
I have been trying to learn how to search my own site for pages using a search feature, i was advised to use the google search feature on my site, this is something i do not want to do. I want to buildmy own. However i was advised try indexing pages.
My question is, how do i go about indexing my pages for search (in simple terms please). If possible how do i display the search results in a table?
Regards,
Jenova
-
Re: Indexing Search
You should have all your content in a database and then the searching is as simple as a SQL query.
Otherwise you will need to traverse each page using a server-side script, scheduled using a cronjob. Messy, and not as effective.
-
Re: Indexing Search
What do you mean have al my content in a database, as in the webpages i build?
-
Re: Indexing Search
Basically, you store the part of the HTML code that changes on each page, in a database. Then when displaying a page just retrieve it from the DB and stick the code in between the common header/footer.
How exactly you implement it depends on what kind of site you're building. Can you tell us what sort of content the pages will have?
-
Re: Indexing Search
Quite a bit of text and images etc. I'm attempting to build a knowledge base.
-
Re: Indexing Search
Then you must use a database, else your knowledge base will become large and unwieldy like my shoulder hair.
Aren't you using a database? If you are, then you should know how to do a SELECT across the most important fields for when a user attempts a search.