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 Giovanni Gherdovich <g....@gmail.com> on 2012/06/30 13:36:13 UTC

querying thru solritas gives me zero results

Hi all,

this morning I was very proud of myself since I managed
to set up solritas ( http://wiki.apache.org/solr/VelocityResponseWriter )
for the solr instance on my server (ubuntu natty).

This joy lasted only half a minute, since the only query
that gets more than zero results with solritas is the catchall "*:*"

for example:
http://my.server.com:8080/solr/select/?q=foobar has thousands of results,
​http://my.server.com:8080/solr/itas?q=foobar has none

Here the standard and "velocity" request handlers from my solrconfig.xml;

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
  <requestHandler name="standard" class="solr.SearchHandler" default="true">
     <lst name="defaults">
       <str name="echoParams">explicit</str>
     </lst>
  </requestHandler>
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
  <queryResponseWriter name="velocity"
class="org.apache.solr.request.VelocityResponseWriter"/>
  <requestHandler name="/itas" class="solr.SearchHandler">
    <lst name="defaults">
      <str name="wt">velocity</str>
      <str name="v.template">browse</str>
      <str name="title">Solr cookbook example</str>
      <str name="defType">dismax</str>
      <str name="q.alt">*:*</str>
      <str name="rows">10</str>
      <str name="fl">*,score</str>
      <str name="qf">name</str>
    </lst>
  </requestHandler>
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8

any hint on how I can debug that?

cheers,
Giovanni

Re: querying thru solritas gives me zero results

Posted by Giovanni Gherdovich <g....@gmail.com>.
Hello Sascha,

Sascha:
> Solritas uses the dismax query parser.
> The dismax config parameter 'qf' specifies
> the index fields to be searched in.
> Make sure that 'name' is your default search field.

I am not sure I understand this; I have no field named 'name'.
My documents are like

-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- --
<add>
   <doc>
       <field name="text">hello solar!</field>
       <field name="id">123</field>
   </doc>
</add>
-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- --

so my understanding here is that they have two fields,
whose 'name' attributes are 'text' and 'id'. My intent
is to make searches over the 'text' field, so maybe this
is the default value for the 'qf' parameter I need to set up?

I am asking since actually my current default for 'qf'
in solritas __is__ 'name', from my solrconfig.xml:

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
 <requestHandler name="/itas" class="solr.SearchHandler">
   <lst name="defaults">
     [...]
     <str name="qf">name</str>
   </lst>
 </requestHandler>
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8

and now that you make me look closely to that,
such a default makes little sense to me
(what? no field named 'name', how could that work
as a default for the "query fields" (qf) !!)

Here the details of those fieldTypes from my schema.xml:

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
<field name="id" type="string" indexed="true" stored="true" required="true" />
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8


resuming:

1) I don't understand what does it mean defaulting 'qf' to 'name' in
disMax. I have no field named 'name'.
2) From what I understand, my 'qf' value for disMax should default to
'text', the name of the field I care of.

correct?

cheers,
Giovanni

Re: querying thru solritas gives me zero results

Posted by Sascha Szott <sz...@gmx.de>.
Hi,

Solritas uses the dismax query parser. The dismax config parameter 'qf' specifies the index fields to be searched in. Make sure that 'name' is your default search field.

-Sascha




Giovanni Gherdovich <g....@gmail.com> schrieb:

Hi all,

this morning I was very proud of myself since I managed
to set up solritas ( http://wiki.apache.org/solr/VelocityResponseWriter )
for the solr instance on my server (ubuntu natty).

This joy lasted only half a minute, since the only query
that gets more than zero results with solritas is the catchall "*:*"

for example:
http://my.server.com:8080/solr/select/?q=foobar has thousands of results,
​http://my.server.com:8080/solr/itas?q=foobar has none

Here the standard and "velocity" request handlers from my solrconfig.xml;

-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<lst name="defaults">
<str name="echoParams">explicit</str>
</lst>
</requestHandler>
-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8

-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8
<queryResponseWriter name="velocity"
class="org.apache.solr.request.VelocityResponseWriter"/>
<requestHandler name="/itas" class="solr.SearchHandler">
<lst name="defaults">
<str name="wt">velocity</str>
<str name="v.template">browse</str>
<str name="title">Solr cookbook example</str>
<str name="defType">dismax</str>
<str name="q.alt">*:*</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
<str name="qf">name</str>
</lst>
</requestHandler>
-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8

any hint on how I can debug that?

cheers,
Giovanni


Re: querying thru solritas gives me zero results

Posted by Giovanni Gherdovich <g....@gmail.com>.
2012/6/30 Erik Hatcher:
> Debugging this you can add &debugQuery=true&wt=xml to get
> the full classic Solr XML output that drives it all.

Thank you Erik, I'll see what I get from it.

cheers,
GGhh

Re: querying thru solritas gives me zero results

Posted by Erik Hatcher <er...@gmail.com>.
Debugging this you can add &debugQuery=true&wt=xml to get the full classic Solr XML output that drives it all. 

    Erik

On Jun 30, 2012, at 7:36, Giovanni Gherdovich <g....@gmail.com> wrote:

> Hi all,
> 
> this morning I was very proud of myself since I managed
> to set up solritas ( http://wiki.apache.org/solr/VelocityResponseWriter )
> for the solr instance on my server (ubuntu natty).
> 
> This joy lasted only half a minute, since the only query
> that gets more than zero results with solritas is the catchall "*:*"
> 
> for example:
> http://my.server.com:8080/solr/select/?q=foobar has thousands of results,
> ​http://my.server.com:8080/solr/itas?q=foobar has none
> 
> Here the standard and "velocity" request handlers from my solrconfig.xml;
> 
> -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
>  <requestHandler name="standard" class="solr.SearchHandler" default="true">
>     <lst name="defaults">
>       <str name="echoParams">explicit</str>
>     </lst>
>  </requestHandler>
> -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
> 
> -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
>  <queryResponseWriter name="velocity"
> class="org.apache.solr.request.VelocityResponseWriter"/>
>  <requestHandler name="/itas" class="solr.SearchHandler">
>    <lst name="defaults">
>      <str name="wt">velocity</str>
>      <str name="v.template">browse</str>
>      <str name="title">Solr cookbook example</str>
>      <str name="defType">dismax</str>
>      <str name="q.alt">*:*</str>
>      <str name="rows">10</str>
>      <str name="fl">*,score</str>
>      <str name="qf">name</str>
>    </lst>
>  </requestHandler>
> -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
> 
> any hint on how I can debug that?
> 
> cheers,
> Giovanni