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 Chip Calhoun <cc...@aip.org> on 2011/07/01 20:51:13 UTC
Getting started with Velocity
I'm a Solr novice, so I hope I'm missing something obvious. When I run a search in the Admin view, everything works fine. When I do the same search in http://localhost:8983/solr/browse , I invariably get "0 results found". What am i missing? Are these not supposed to be searching the same index?
Thanks,
Chip
RE: Getting started with Velocity
Posted by Chip Calhoun <cc...@aip.org>.
Thanks. Is there any way to change what fields browse uses / asks for? I've tried changing the code, and I'm clearly missing something. I either get the same fields it was displaying before (and no search results) or I get something that doesn't work at all.
-----Original Message-----
From: Way Cool [mailto:way1.waycool@gmail.com]
Sent: Friday, July 01, 2011 5:51 PM
To: solr-user@lucene.apache.org
Subject: Re: Getting started with Velocity
By default, browse is using the following config:
<requestHandler name="/browse" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<!-- VelocityResponseWriter settings -->
<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">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>
<str name="facet">on</str>
<str name="facet.field">cat</str>
<str name="facet.field">manu_exact</str>
<str name="facet.query">ipod</str>
<str name="facet.query">GB</str>
<str name="facet.mincount">1</str>
<str name="facet.pivot">cat,inStock</str>
<str name="facet.range">price</str>
<int name="f.price.facet.range.start">0</int>
<int name="f.price.facet.range.end">600</int>
<int name="f.price.facet.range.gap">50</int>
<str name="f.price.facet.range.other">after</str>
<str name="facet.range">manufacturedate_dt</str>
<str
name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
<str name="f.manufacturedate_dt.facet.range.end">NOW</str>
<str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
<str name="f.manufacturedate_dt.facet.range.other">before</str>
<str name="f.manufacturedate_dt.facet.range.other">after</str>
<!-- Highlighting defaults -->
<str name="hl">on</str>
<str name="hl.fl">text features name</str>
<str name="f.name.hl.fragsize">0</str>
<str name="f.name.hl.alternateField">name</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
<!--
<str name="url-scheme">httpx</str>
-->
</requestHandler>
while the normal search is using the following:
<requestHandler name="search" class="solr.SearchHandler" default="true">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
</lst>
</requestHandler>.
Just make sure you have those fields defined in browse also in your doc, otherwise change to not use dismax. :-)
On Fri, Jul 1, 2011 at 12:51 PM, Chip Calhoun <cc...@aip.org> wrote:
> I'm a Solr novice, so I hope I'm missing something obvious. When I
> run a search in the Admin view, everything works fine. When I do the
> same search in http://localhost:8983/solr/browse , I invariably get "0 results found".
> What am i missing? Are these not supposed to be searching the same index?
>
> Thanks,
> Chip
>
Re: Getting started with Velocity
Posted by Way Cool <wa...@gmail.com>.
By default, browse is using the following config:
<requestHandler name="/browse" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<!-- VelocityResponseWriter settings -->
<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">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>
<str name="facet">on</str>
<str name="facet.field">cat</str>
<str name="facet.field">manu_exact</str>
<str name="facet.query">ipod</str>
<str name="facet.query">GB</str>
<str name="facet.mincount">1</str>
<str name="facet.pivot">cat,inStock</str>
<str name="facet.range">price</str>
<int name="f.price.facet.range.start">0</int>
<int name="f.price.facet.range.end">600</int>
<int name="f.price.facet.range.gap">50</int>
<str name="f.price.facet.range.other">after</str>
<str name="facet.range">manufacturedate_dt</str>
<str
name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
<str name="f.manufacturedate_dt.facet.range.end">NOW</str>
<str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
<str name="f.manufacturedate_dt.facet.range.other">before</str>
<str name="f.manufacturedate_dt.facet.range.other">after</str>
<!-- Highlighting defaults -->
<str name="hl">on</str>
<str name="hl.fl">text features name</str>
<str name="f.name.hl.fragsize">0</str>
<str name="f.name.hl.alternateField">name</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
<!--
<str name="url-scheme">httpx</str>
-->
</requestHandler>
while the normal search is using the following:
<requestHandler name="search" class="solr.SearchHandler" default="true">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
</lst>
</requestHandler>.
Just make sure you have those fields defined in browse also in your doc,
otherwise change to not use dismax. :-)
On Fri, Jul 1, 2011 at 12:51 PM, Chip Calhoun <cc...@aip.org> wrote:
> I'm a Solr novice, so I hope I'm missing something obvious. When I run a
> search in the Admin view, everything works fine. When I do the same search
> in http://localhost:8983/solr/browse , I invariably get "0 results found".
> What am i missing? Are these not supposed to be searching the same index?
>
> Thanks,
> Chip
>