how to make a search engine for website? [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
开发者_如何学Python Improve this questionI want to have a search engine for my website, is any of these web search engines(like Google,yahoo,etc) provide a free service? Or I should do it by myself
Maybe Google Custom Search?
Zend_Search_Lucene is a fully implemented and fast PHP based fulltext search engine. You'll have to index your own data but it provides a great deal of flexibility and control (search content, type, associated data to return etc). There are also implementations in many other languages.
This is a better option if you are indexing products or documents, not if you want the content of your website to be searched à la Google.
Aside from writing the Database queries and filters yourself, you could try out the Google Custom Search.
Check out Google Custom Search Engine.
You have to pay for Google Custom Search (CSE) unless you are OK with showing ads for other services on your site. You can accomplish something similar to CSE with a lot more flexibility by implementing Google's Search API.
Check out their example implementations, specifically the one about a simple search box.
Well I think it would be important to describe what exactly you're trying to "search" for. Is your site inventory based? Or is it just pages of information that you share?
If your site is inventory that you show, then it's entirely possible to create a database query to search for items off your site.
However, if your site is just pages of information with no database connectivity, then you may find it harder to write one yourself and thus should use a third party search such as google.
You could use google's api/ajax service for your site. I'd submit a sitemap.xml, and a robots.txt file for search engines to crawl your site.
I have always done my own, If like me your website makes use of an SQL based database, WHERE and %LIKE% for me seem to provide all the functionality required.
If you use MySQL, there is nothing easier. Use MySQL Full-Text Search functions: http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html
You can even short results according to relevance. Google it, examples are everywhere.
You can use a YaCy installation using the Portal Mode:
- after Installation of YaCy, click on "Search portal for your own web pages" in the /ConfigBasic.html page
- in /CrawlStartSite_p.html put in all your sites that you want to include in the search (i.e. your own page as you asked)
This is really easy and there are lots of monitoring and SEO tools included as well.
How about Sphinx?
http://www.sphinxsearch.com/
Google provides custom search at free of cost upto 100 queries per day. If you want more you have to pay. Google search for website
here is code for custom search
You can build small search engine with Pedatus - Micro Search Engine and Orinus - JavaScript SandBox
This is example site: Paesia - Micro Search Engine
精彩评论