You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Romita Saha <Ro...@sg.panasonic.com> on 2012/11/27 13:00:35 UTC
Change UI using Solritas
Hi,
I want to change the UI of Solr. As far as I understand, I need to append
the following code in the solrconfig.xml file. Could anyone please help me
find out how I need to write my query url and whether I need to change
any other files other than solrconfig.xml.
<requestHandler name="/browse" class="solr.SearchHandler">
<lst name="defaults">
<str name="wt">velocity</str>
<str name="v.template">browse</str>
<str name="v.layout">layout</str>
<str name="title">Solritas</str>
<str name="defType">dismax</str>
<str name="q.alt">*:*</str>
<str name="rows">10</str>
<str name="fl">data,id,score</str>
</lst>
</requestHandler>
Thanks and regards,
Romita
Re: Change UI using Solritas
Posted by RPSolrUser <ro...@gmail.com>.
Romita,
Solritas works great for quick prototyping or proof of concept if that is
your aim.
You just added /browse request handler in solrconfig.xml the way you
described. I have my example here.
You can invoke it via http call like:
http://host:port/solr/corename/browse?q=*%3A*&debugQuery=true
For look and feel change, you will have to play with velocity templates and
css found in solrhome/corename/conf/velocity folder.
<requestHandler name="/browse" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="wt">velocity</str>
<str name="v.template">browse</str>
<str name="v.layout">layout</str>
<str name="title">Solritas</str>
<str name="df">text</str>
<str name="defType">edismax</str>
<str name="q.alt">*:*</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
<str name="mlt.qf">
title^1.0 url^1.0
</str>
<str name="mlt.fl">title,url/str>
<int name="mlt.count">3</int>
<str name="qf">
title^1.0 url^1.0
</str>
</requestHandler>
Good luck.
--
View this message in context: http://lucene.472066.n3.nabble.com/Change-UI-using-Solritas-tp4022593p4022726.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Change UI using Solritas
Posted by Erick Erickson <er...@gmail.com>.
First, solritas isn't intended to be a user-facing Solr interface, it's
generally considered a prototyping tool in Solr. You're allowing
unrestricted access to Solr, so I can enter
...../update?stream.body=<delete><query/>*:*</query></delete>&commit=true
in the url and delete your entire index. Are you sure you want to do this?
People have done it, but a far more common option is to put Solr behind a
proper middleware app and control the queries.
All that said, if you still want to do this you need to modify the
conf/velocity files, see the Apache Velocity project for details.
Best
Erick
On Tue, Nov 27, 2012 at 7:00 AM, Romita Saha
<Ro...@sg.panasonic.com>wrote:
> Hi,
>
> I want to change the UI of Solr. As far as I understand, I need to append
> the following code in the solrconfig.xml file. Could anyone please help me
> find out how I need to write my query url and whether I need to change
> any other files other than solrconfig.xml.
>
> <requestHandler name="/browse" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="wt">velocity</str>
> <str name="v.template">browse</str>
> <str name="v.layout">layout</str>
> <str name="title">Solritas</str>
> <str name="defType">dismax</str>
> <str name="q.alt">*:*</str>
> <str name="rows">10</str>
> <str name="fl">data,id,score</str>
> </lst>
> </requestHandler>
>
>
> Thanks and regards,
> Romita