[ckan-dev] SOLR oddity

Adrià Mercader amercadero at gmail.com
Fri Sep 16 11:20:53 UTC 2011


Hi,
Maybe someone with more experience with SOLR can help me with this one.

I need to add a new facet to the dataset search for IATI
(http://iati.test.ckan.net/dataset). Notice that the 'File type' facet
is empty.
I refreshed the search index with no effect, and after much
investigating (on my local machine works perfectly), I found the
following:

On the Fry SOLR server, if you facet by an extra field which name
contains an underscore (e.g. 'file_type', 'archive_file'), no facets
are returned (look for 'facet_counts'):

http://okfn-solr.fry-it.com:8080/solr/testing.iatiregistry.org/select?indent=on&version=2.2&q=bolivia&fq=&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&debugQuery=on&explainOther=&hl.fl=&facet=true&facet.field=extras_file_type

Extras named with a single word work fine:

http://okfn-solr.fry-it.com:8080/solr/testing.iatiregistry.org/select?indent=on&version=2.2&q=bolivia&fq=&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&debugQuery=on&explainOther=&hl.fl=&facet=true&facet.field=extras_country

The schema has this relevant line:
<field name="extras_*" type="text" indexed="true" stored="true"
multiValued="true"/>

When running exactly the same first query on my local machine
everything works fine (i.e. file_type facets are returned), with the
same version of SOLR installed and using the same schema.xml, as far
as I can tell.

Anyone has any idea? (Or I'll probably end up switching to 'filetype'
as the extra name)


Many thanks,


Adrià




More information about the ckan-dev mailing list