How to modify search result page given by Solr?

岁酱吖の 提交于 2020-01-15 06:34:19

问题


I intend to make a niche search engine. I am using apache-nutch-1.6 as the crawler and apache-solr-3.6.2 as the searcher. I must say there is very less updated information on web about these technologies.

I followed this tutorial http://wiki.apache.org/nutch/NutchTutorial and have successfully installed apache and solr on my ubuntu system. I was also successful in injecting seed url to webdb and perform the crawl.

Using solr interface at http://localhost:8983/solr/admin, I can also query the crawled results. But this is the output I receive.

.

Am I missing something here, the earlier apache-nutch-0.7 had a war which generated a clear html output like this.

. How do I achieve this... Or if anyone could point me to a latest tutorial or guidebook, highly appreciated.

回答1:


A couple of things:

  • If you are just starting, do not use Solr 3.6, go straight to latest 4.1+. A bunch of things have changed and a lot of new features are added.
  • You seem to be saying that you will expose Solr + UI directly to general web - that's a really bad idea, as Solr is completely unsecured and allows web-based delete queries. You really want a business layer in a middle.
  • With Solr 4.1, there is a pretty Admin UI and, also, there is a /browse page that shows how to use Velocity to do the pages backed by Solr. Or have a look at something like Project Blacklight for an example of how to get UI over Solr.



回答2:


I found below link http://cmusphinx.sourceforge.net/2012/06/building-a-java-application-with-apache-nutch-and-solr/ which answered my query.

I agree after reading the content available on above link, I felt very angry at me. Solr package provides all the required objects to query solr.

Infact, the essential jars are just solr-solrj-3.4.0.jar, commons-httpclient-3.1.jar and slf4j-api-1.6.4.jar.

Anyone can build a java search engine using these objects to query the database and have a fancy UI.

Thanks again.



来源:https://stackoverflow.com/questions/14728903/how-to-modify-search-result-page-given-by-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!