I researched the topic and ask a Solr specialist in our company. The problem he sees starts when the query parameters are build up in the groups.py controller:
When you query for a field within a group: say 'Stadtplan' in the group 'umwelt':
'q' is set in the groups.py controller to u'Stadtplan + groups:"umwelt'.
This causes that the query comes back empty.
The solr expert suggested to me that the group here is a filter and should such be added to the fq parameter instead.
I feel the search logic for groups is hard to understand in this and it is really hard to overwrite it, since the Group Controller does a lot of things.
I could get the search to work by patching the lib.search.query and using edismax instead of dismax when performing the query on solr. But I want to discuss the general approach for CKAN search in groups here, since I think there is improvement needed in this part of CKAN.
I also want to understand the approach that has been taken. Why is the group added to the q parameter rather then to the fq paramter for the solr-query?
On our CKAN istallation search within does not work as expected, see issue: https://github.com/ckan/ckan/issues/4917
I researched the topic and ask a Solr specialist in our company. The problem he sees starts when the query parameters are build up in the
groups.py
controller:When you query for a field within a group: say 'Stadtplan' in the group 'umwelt':
'q'
is set in the groups.py controller tou'Stadtplan + groups:"umwelt'
. This causes that the query comes back empty.The solr expert suggested to me that the group here is a filter and should such be added to the
fq
parameter instead.I feel the search logic for groups is hard to understand in this and it is really hard to overwrite it, since the Group Controller does a lot of things.
I could get the search to work by patching the
lib.search.query
and usingedismax
instead ofdismax
when performing the query on solr. But I want to discuss the general approach for CKAN search in groups here, since I think there is improvement needed in this part of CKAN.I also want to understand the approach that has been taken. Why is the group added to the
q
parameter rather then to thefq
paramter for the solr-query?