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 srini <so...@gmail.com> on 2012/04/18 22:49:55 UTC

Difference between Search result from Admin console and solr/browse

I have imported my xml documents from oracle database and indexed them. When
I search *:* in *admin console *I do get results. My xml format is not close
to what solr expects. but still when I search for any word that is part of
my xml document Solr displays whole xml document. for example if I search
for word "voicemail" solr displays xml documents that has word "voicemail"

Now when I go to solr/browse and give *:* I do see some thing but each
result is like below (no data) even if i search for same word "voicemail" I
am getting below. Can some body !!!!!!please Advice!!!!!

Price:
Features:
In Stock

there are only two things I can think off, one is settings in
solrconfig.xml(like below). 

<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">
         text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
       </str>
       <str name="mlt.fl">text,features,name,sku,id,manu,cat</str>
       <int name="mlt.count">3</int>
       <str name="qf">
          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
       </str>



--
View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-Search-result-from-Admin-console-and-solr-browse-tp3921323p3921323.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Difference between Search result from Admin console and solr/browse

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

The /browse Request Handler is built to showcase the xml documents in solr/example/exampledata and if you want to use it for your own data and schema you must modify the templates in solr/example/conf/velocity/ to display whatever you want to display.

Given that you use an unmodified example schmema, you should be able to get more or less the same results as in Admin console (which uses the Lucene query parser on default field "text" ootb) by querying for text:voicemail. If you then click the "enable debug" link at the bottom of the page and then click the "toggle all fields" links below each result hit, you will see what is contained in each and every field.

What you probably *should* do is to transform your oracle XMLs into XML that corresponds with Solr's schema, and you should tweak your schema and Velocity templates to match what you'd like to output in the reults. A simple way to prototype transforms is to write an XSL and using the XSLTUpdateRequestHandler at solr/update/xslt instead of the XML handler. See http://wiki.apache.org/solr/XsltUpdateRequestHandler

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 18. apr. 2012, at 22:49, srini wrote:

> I have imported my xml documents from oracle database and indexed them. When
> I search *:* in *admin console *I do get results. My xml format is not close
> to what solr expects. but still when I search for any word that is part of
> my xml document Solr displays whole xml document. for example if I search
> for word "voicemail" solr displays xml documents that has word "voicemail"
> 
> Now when I go to solr/browse and give *:* I do see some thing but each
> result is like below (no data) even if i search for same word "voicemail" I
> am getting below. Can some body !!!!!!please Advice!!!!!
> 
> Price:
> Features:
> In Stock
> 
> there are only two things I can think off, one is settings in
> solrconfig.xml(like below). 
> 
> <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">
>         text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
>       </str>
>       <str name="mlt.fl">text,features,name,sku,id,manu,cat</str>
>       <int name="mlt.count">3</int>
>       <str name="qf">
>          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
>       </str>
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-Search-result-from-Admin-console-and-solr-browse-tp3921323p3921323.html
> Sent from the Solr - User mailing list archive at Nabble.com.