Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKAN search not working correctly when scoped to organization #851

Closed
adborden opened this issue Jul 15, 2019 · 5 comments
Closed

CKAN search not working correctly when scoped to organization #851

adborden opened this issue Jul 15, 2019 · 5 comments

Comments

@adborden
Copy link
Contributor

When searching on inventory within an organization, general keyword searches aren't returning any results.

Notice when searching "federal" within GSA:
Screenshot from 2019-07-15 14-28-44

When searching across inventory for "federal" we see GSA datasets:

Screenshot from 2019-07-15 14-31-48

How to reproduce

  1. Open the GSA organization.
  2. Search for "federal"

Expected behavior

Some results matching the query, similar to searching "federal" from the dataset page, and filtering on GSA.

Actual behavior

No results.

@adborden
Copy link
Contributor Author

This is also affecting catalog.

https://catalog.data.gov/organization/va-gov?q=gravesite&sort=score+desc%2C+metadata_modified+desc&as_sfid=AAAAAAXH-HBd9pBNhwenGUdKVGPMXXTZpiOximSg9FTazahxv3wLR8LYE8ZK0j5lfPUi6XcHxUAJYmXG5db8RVSZbjCWLGBxvMUi2yCo4DQIPnj_MmRLeFi9aa-N7ZGc1PzSqL8%3D&as_fid=6a863b9c066fada483a7994221ec634730c5347b

I can see the request going to solr, but no hits are returned:

$ sudo tail -f /var/log/solr/solr.log | grep gravesite
2019-07-16 00:04:11.349 INFO  (qtp1761061602-50863) [   x:catalog] o.a.s.c.S.Request [catalog]  webapp=/solr path=/select params={facet.limit=50&q=gravesite+owner_org:"ff9ae098-eccc-41d8-bfcd-5e8ed047db05"&facet.field=groups&facet.field=vocab_category_all&facet.field=metadata_type&facet.field=tags&facet.field=res_format&facet.field=harvest_source_title&facet.field=dataset_type&facet.field=publisher&facet.field=bureauCode&fl=id+validated_data_dict&start=0&sort=score+desc,+metadata_modified+desc&fq=-collection_package_id:[""+TO+*]+capacity:"public"+%2Bsite_id:"geo.gov"+%2Bstate:active&facet.mincount=1&rows=21&facet=true&wt=json} hits=0 status=0 QTime=1

@adborden adborden changed the title Inventory search not working correctly when scoped to organization CKAN search not working correctly when scoped to organization Jul 16, 2019
@adborden
Copy link
Contributor Author

adborden commented Jul 16, 2019

One reason for the discrepancy is that the site-wide search is a DisMax search while the organization search is not.

Site-wide:

2019-07-16 00:54:08.958 INFO  (qtp1761061602-50822) [   x:catalog] o.a.s.c.S.Request [catalog]  webapp=/solr path=/select params={mm=2<-1+5<80%25&facet.field=groups&facet.field=vocab_category_all&facet.field=metadata_type&facet.field=tags&facet.field=res_format&facet.field=organization_type&facet.field=organization&facet.field=publisher&facet.field=bureauCode&fl=id+validated_data_dict&start=0&sort=views_recent+desc&fq=%2Bdataset_type:dataset+-collection_package_id:[""+TO+*]+capacity:"public"+%2Bsite_id:"geo.gov"+%2Bstate:active&rows=21&facet.limit=50&q=gravesite&tie=0.1&defType=dismax&qf=name^4+title^4+tags^2+groups^2+text&facet.mincount=1&facet=true&wt=json} hits=324 status=0 QTime=4

Organization search:

2019-07-16 00:54:01.663 INFO  (qtp1761061602-50806) [   x:catalog] o.a.s.c.S.Request [catalog]  webapp=/solr path=/select params={facet.limit=50&q=gravesite+owner_org:"ff9ae098-eccc-41d8-bfcd-5e8ed047db05"&facet.field=groups&facet.field=vocab_category_all&facet.field=metadata_type&facet.field=tags&facet.field=res_format&facet.field=harvest_source_title&facet.field=dataset_type&facet.field=publisher&facet.field=bureauCode&fl=id+validated_data_dict&start=0&sort=score+desc,+metadata_modified+desc&fq=-collection_package_id:[""+TO+*]+capacity:"public"+%2Bsite_id:"geo.gov"+%2Bstate:active&facet.mincount=1&rows=21&facet=true&wt=json} hits=0 status=0 QTime=1

@adborden
Copy link
Contributor Author

This bug looks familiar and includes a partial fix ckan/ckan#3291

@adborden
Copy link
Contributor Author

I at least confirmed that using fq=organization:xxx provides results while q=owner_org:xxx does not.

@adborden
Copy link
Contributor Author

Inventory fix GSA/ckan#59
Catalog fix GSA/ckan#58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant