[ckan-dev] ckanext-scheming custom resource fields and search SOLVED

lucia.espona at wsl.ch lucia.espona at wsl.ch
Fri Jun 2 11:34:10 UTC 2017


Dear all

Since I only need to index one extra resource field, I used the config option 'ckan.extra_resource_fields'.

Anyway it will be better to automatically add all the scheming defined fields to the SOLR index as it is done for the package metadata.
For the packages, the extras are kept in the package dictionary when it arrives to the indexing but for the resources, the extras are no longer present. 
My only idea is to extend "before_index" and add all the custom fields defined in scheming.

Any suggestions or alternative solutions are still appreciated.

Best,
Lucia

_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch

-----"ckan-dev" <ckan-dev-bounces at lists.okfn.org> wrote: -----
To: "CKAN Development Discussions" <ckan-dev at lists.okfn.org>
From: lucia.espona at wsl.ch
Sent by: "ckan-dev" 
Date: 29.05.2017 16:28
Subject: [ckan-dev] ckanext-scheming custom resource fields and search

 Dear all

I would like to search resources by the fields I defined using scheming (same as for packages).

Ex. http://envidat02.wsl.ch:5000/api/action/resource_search?query=mycustomfield:mycustomvalue

The Solr schema.xml seems to be ready for extra resource fields:
    <dynamicField name="extras_*" type="text" indexed="true" stored="true" multiValued="false"/>
    <dynamicField name="res_extras_*" type="text" indexed="true" stored="true" multiValued="true"/>But I do not see any dynamic field "res_extras_*", while for the packages the "extras_*" fields appear properly.

Is this something related to my config? Is this a limitation in ckanext-scheming? I am not sure "where"to implement this functionality in case is necessary.

Many thanks in advance.

Best regards,
Lucia Espona

_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch 
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170602/fb408cfc/attachment-0002.html>


More information about the ckan-dev mailing list