IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
878 stars 487 forks source link

Advanced Search on dataverse subject #1681

Closed pdurbin closed 9 years ago

pdurbin commented 9 years ago

In #1452 the "subject" of a dataverse was changed to be populated by dataset subjects. That ticket went through QA but as I work on #1314 I'm questioning if one can still use Advanced Search to find dataverses based on the "subject" checkboxes. I'm having trouble with this in dev anyway. Passing this @scolapasta for review.

Please note that #1428 is still open and related but it has more to do with an ampersand (&) being in the subject.

scolapasta commented 9 years ago

I tested on dvn-build and it worked.

pdurbin commented 9 years ago

@scolapasta well, it's not working the way I expect.

'dvSubject_en:"Arts and Humanities"' is matching both "Arts and Humanities" and "Astronomy and Astrophysics":

root_dataverse_-_2015-03-17_08 12 12

But maybe that's because that dataverse has both? I guess we're relying entirely on Solr to display the subjects properly in the UI. Maybe when looking at "general information" for a dataverse we should show (read only) which subjects the dataverse contains.

From a search perspective, I think I need to change this from text_en to string' (Solr types) for an exact match. Perhaps all checkboxes on Advanced Search should be backed by a Solrstring` type. Let me think some more about this.

pdurbin commented 9 years ago

In SearchFields.java if I rename "dvSubject_en" to a Solr field name that is non-dynamic and to an "index all" Solr does not complain that the field doesn't exist. It's as if dataverse.getDataverseSubjects() never returns anything.

pdurbin commented 9 years ago

@scolapasta explained that I had to publish a dataverse before dataverse.getDataverseSubjects() will return anything.

I change the Solr field type to string since it's better for faceting as part of 90f3e73

Passing to QA. I would recommend testing this ticket and #1428 at the same time.

posixeleni commented 9 years ago

Works as expected and also tested #1428 :

image

Closing.