[ckan-dev] Solr Indexing Documents

Adrià Mercader adria.mercader at okfn.org
Thu Jun 13 16:54:16 UTC 2013


Hi Prahadeesh,


On 12 June 2013 18:42, Prahadeesh S <prahad at gmail.com> wrote:
> Hi,
>
> I am looking into the indexing of package and got few queries.
>
> 1. Indexing custom metadata fields .
>
>  Need to figure out a better way to include additional (ckan default fields)
> meta-data fields and custom fields(resource extras) into Solr indexing. So
> that those fields also be part of keyword search.
>
> I could see "before_index" function in IPackageController is the place to
> start doing this. I tried modifying the package dictionary as part of
> "before_index" by adding new fields as "extras" and it works fine.
>
> Esp. I need to include the resources fields to be included as part of
> search. I can still create "extras" for the all the fields I want to include
> as part of search.
>
> But is this right approach which I am doing or is there any other better way
> to implement this?
All extras of a dataset will be indexed for search. You can either
actually add them via the form or the API to the dataset, or as you
are already doing, just add them on before_index.

If I remember correctly only the resources description, url and
formats are indexed (res_description, res_url and res_format).


>
> 2. Is there anyway to do the indexing of documents uploaded as part of
> resources.
>     Does any of the existing extensions (datastorer?) have an option or way
> to index the documents(doc or pdfs?)?
There isn't a way currently to index the actual documents I'm afraid.


Adrià



> Thanks
> Prahadeesh
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list