[ckan-dev] Change the default ckan facet search

mane moshref many_yammy at yahoo.com
Mon Oct 28 09:57:59 UTC 2019


 Thank you Harald!
    On Friday, October 25, 2019, 10:37:49 AM GMT+2, von Waldow, Harald <harald.vonwaldow at eawag.ch> wrote:  
 
 
> I searched for "Content type", "content type", "Content_type" and
> "content_type" as I do not know whether it is case sensitive and
> nothing came out.

I see. It appears the key "Content Type" is indexed as "ContentType",
so searching for "ContentType:*" (without quotation marks) will work.

Hint: Looking at the Solr admin-interface at localhost:8983 of dev
machine helps figuring out stuff like that.

> The point is that we have several resource providers from different
> backgrouns and we do not know exactly which fields are necessary
> for them to be included in the metadata, so we decided to give the
> freedom to them to define it. But it requires that we will be able
> to index them without already knowing their field names.

I see. So but that works, at least with CKAN 2.8.2 and default SOLR
schema.

A for the other task, getting dynamically created extra fields
dynamically into facets, I don't know how to do that. Can imagine
that gets tricky.


Cheers,
Harald


> 
> 
> 
> 
> > The overal task for us is as follows:
> 
> >I don't think it is a good idea to use field names to represent
> data.
> >Why not have two fields: "antenna_brand" and "antenna_range" ?
> 
> 
> The point is that we have several resource providers from different
> backgrouns and we do not know exactly which fields are necessary
> for them to be included in the metadata, so we decided to give the
> freedom to them to define it. But it requires that we will be able
> to index them without already knowing their field names.
> 
> 
> But it seems ithat something does not work on my ckan instance. If
> you say that I should be able to find the datasets which have
> "Content type" as their additinal field name.
> 
> 
> On Thu, 2019-10-24 at 13:15 +0000, mane moshref wrote:
> > Hi Harald,
>>> > I just got what you meant by "search for "content_type:*""
> > It doesn't turn any result.
>> > Example: Dataset A
>>> > In the CKAN search box if I search for monitoring I get the
> > corresponding dataset but with Content type, I recieve no
> dataset.
> > I am not familiar with Solr.
> > My question is, it is possible that solr does index field name so
> > that I can search for random text and see whether there is any
> data
> > with such field name for us in this case e.g. "content type".
>> > The overal task for us is as follows:
> > users need to insert some datasets. These datasets should have
> some
> > additional fields. one of the fields is about the specific
> Anthena
> > that used to callect the all related data. The field name is the
> > name anthena's brand and the value is the range. None of these
> two
> > are in prior familier to us. So we should provide a dynamic
> search
> > to our clients / myckan visitors where they just write the brand
> > [field name] they look for and see whether there is any dataset
> > which uses this brand...... and ideally as the next step, if
> there
> > are more than one datasets they look for a specific range
> [value].
>>> > I feel it should be possible but cannot find any related
> > documentation for CKAN in this regard.
>> > Any help is appreciated
> > Best regards
> > Mandana
>>>> > On Wednesday, October 23, 2019, 1:36:39 PM GMT+2, von Waldow,
> > Harald <Harald.vonWaldow at eawag.ch> wrote:
>>> > Hi Mani
>> > If I understand correctly, you want to have a look at the SOLR
> > search
> > syntax.
>> > 1. To find any dataset that has the field content_type, no matter
> > its
> > value, search for "content_type:*"
>> > 3. Searching for the union of the packages for two or more
> > organizations works like so:
>> > "organization:(decision-analysis OR stream-ecology)"
>> > Making that more userfriendly, e.g. pimp the facet search UI so
> > that
> > it allows users to combine searches with "OR", would be nice, and
> > I'd
> > happily use it if someone implemented it :).
>> > 2. That's how I do it too. Hints for more elegance welcome.
>>> > Cheers,
> > Harald
>>> > On Wed, 2019-10-23 at 10:21 +0000, mane moshref wrote:
> > > Dear all,
> > > 
> > > I have couple of questions regarding the search facet and extra
> > > fields.
> > > 
> > > 1. Is it possible to index extra field and not extra value?
> > > I assume CKAN does not index the name/title of extra fields.
> for
> > > example I as a user add the field:"content type",
> > > Value:"monitoring". If I search 'monitoring' it retunrs the
> > correct
> > > dataset, however if I search 'content type' nothing will
> return.
> > > So, is there any way to also search for the field name and not
> > > necessarily the value.
> > > 
> > > 2. In my use case, users should be open to add up to 4 extra
> > > fields. And I need to add to facet search, one is the extra
> field
> > > names and the other their values. Is there any way to add
> > > automatically this into the facet? o I need definitely give the
> > > extra field name (similar to this)
> > > 
> > >            EUDAT-B2FIND/ckanext-b2findB2FIND extension for
> > > CKAN. Contribute to EUDAT-B2FIND/ckanext-b2find development by
> > > creating an account on GitHub.  
> > > 
> > > 3. The current behaviour of CKAN is, in the page
> > > /myckan.com/dataset, i am only able to search based on one
> > > organisation. I mean there is no possibility to search datasets
> > > based on multiple chosen organisations. Is it possible this
> > > behaviour and if yes, which part of the could should i change?
> > > 
> > > 
> > > Many thanks in advance
> > > Best regards
> > > Mani
>> > > 
> > > _______________________________________________
> > > 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
> > -- 
> > Harald von Waldow
> > Eawag
> > ICT Services
> > Research Data Management
> > Ueberlandstrasse 133
> > 8600 Duebendorf
> > http://www.eawag.ch
> > https://opendata.eawag.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
> 
>> > _______________________________________________
> > 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
> -- 
> Harald von Waldow
> Eawag
> ICT Services
> Research Data Management
> Ueberlandstrasse 133
> 8600 Duebendorf
> http://www.eawag.ch
> https://opendata.eawag.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
> _______________________________________________
> 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
-- 
Harald von Waldow
Eawag
ICT Services
Research Data Management
Ueberlandstrasse 133
8600 Duebendorf
http://www.eawag.ch
https://opendata.eawag.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/20191028/3625d9e0/attachment-0002.html>


More information about the ckan-dev mailing list