[ckan-dev] Sitewide Search

Dominik Moritz dominik.moritz at okfn.org
Sun Apr 28 16:23:55 UTC 2013


Hi Marina,

you can use the sql search and join resources. However, as I understand you, you want a search across all resources. The problem that I had is that I don't know how to return the results since all tables have different schemas. I can imagine, that you just want the resources and the matches in each resource in which case a result could look like:

{
	success: true
	query: "find me"
	results:
		[
			{
			resource_id: foo_bar
			matches:
				[
					42: have <b>find me</b> highlighted,
					47: please <b>find me</b>,
					
				]
			}, {
			resource_id: foo_bar_baz
			matches:
				[
					12: you can <b>find me</b>
					
				]
			}
		]
}

This could be done through the postgres full text search which we already have support for http://www.postgresql.org/docs/8.3/static/textsearch.html. 

Having said this, I can't think of anything more than a full text search over all the data in the datastore. However, we don't have any plans to implement this as it would probably perform quite badly. It would probably be better to import a dump of the resource into the solr index.

Best wishes,
Dominik

On 28 Apr 2013, at 10:46, Marina S. Martin <marina at marinamartin.com> wrote:

> I know the Datastore enables searching within an individual dataset (e.g. a
> CSV). Has any work been done on enabling this search across an entire site?
> Is anyone doing this elsewhere?
> 
> Thanks!
> Marina
> _______________________________________________
> 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