tags:

views:

85

answers:

2

I have imported docs into Solr that have fields dynamically created from a pattern (mostly *_s). In the back-end (/solr/admin), I can see that they exist: the aggregate stats, like term frequency, appear correctly. They are all listed as indexed & stored.

However, they do not appear in queries, even when I search across all fields, for example:

/solr/select/?indent=on&q=myterms&fl=*

This problem seems similar to SOLR not searching on certain fields, and I tried the solution there, which was:

If you want your standard query handler to search against all your fields you can change it in your solrconfig.xml (I always add a second query handler instead of modifying "standard". The fl field is the list of fields you want to search against. It's a comma separated list or *.

I made that change to the standard solrconfig.xml, but still get no results.

I tried creating a very simple doc:

{'id':5, 'name':'foo'}

And this query returns that doc:

/solr/select/?indent=on&q=foo&fl=*

The whole results of a query with no results read:

<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
−
<lst name="params">
<str name="echoParams">all</str>
<str name="h1">true</str>
<str name="defType">dismax</str>
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">Foo</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
<result name="response" numFound="0" start="0"/>
</response>
+1  A: 

Is the deftype of your "standard" query handler is dismax? If not, then it won't work. As the answer to the question you provided says, you have to use dismax to search in multiple fields. If you do not want to use dismax and still want to search in many fields at once, you have to use the copy fields feature at index time to gather all the fields you want to search on into one field, and then make that field your default field.

Pascal Dimassimo
I am using dismax, but still not getting results. I've updated my post with a the whole response.
Matt Hampel
Is the field "name" listed in the qf parameter of your dismax config? It must be since "foo" is indexed in that field.
Pascal Dimassimo
It is -- my dismax config is copied here: http://gist.github.com/453487
Matt Hampel
could you post a gist of your entire solrconfig.xml ?
Pascal Dimassimo
A: 

I see your using the query "Foo" while the name value is "foo". You might wanna check if you lowercase terms in de index and query in your schema for the fieldtype you are using for name.

Jem