Other kinds of information in Solr facets?

43 views
Skip to first unread message

Brandon Weigel

unread,
Dec 1, 2017, 11:52:29 AM12/1/17
to islandora
One of our sites wants to be able to filter search results by whether or not the objects have a PDF datastream (i.e. whether full text is available). We're using the discoverygarden basic Solr config, and there's no Solr field that flags whether the PDF exists..

Is there any way out of the box to make this work? Or failing that, any way to insert such information into the facets with a module?

Kelsey

unread,
Dec 1, 2017, 12:08:53 PM12/1/17
to islandora
Hi Brandon,
You could try setting up a facet for fedora_datastream_info_PDF_ID_ms, if you have that field (I also use the DG basic solr config). If you don't have that field, I would do a query in the solr interface for a record that does have a PDF, and see if you can find a field that would indicate the presence of a PDF. If you need help with that just let me know.

Best,
Kelsey

dp...@metro.org

unread,
Dec 1, 2017, 1:20:56 PM12/1/17
to islandora
Brandon, 

If you facet on "fedora_datastreams_ms" which contains all datastreams an object has, you get exactly what you are searching for
Example
"fedora_datastreams_ms": [ "AUDIT", "RELS-EXT", "OBJ", "DC", "MODS", "TECHMD", "TN", "JPG", "JP2", "POLICY" ],

issue is of course, you need at least one object with a PDF datastream to be able to filter-facet for objects that don´t have PDF. But that issue is present in any non custom solution.

Diego

Brandon Weigel

unread,
Dec 4, 2017, 10:03:04 AM12/4/17
to islandora
Thanks, Kelsey and Diego! Both of those options work: fedora_datastream_info_PDF_ID_ms provides all objects with a PDF datastream, while fedora_datastreams_ms offers all possible datastreams. 

I'm going to use fedora_datastream_info_PDF_ID_ms for now. But it seems like it would be useful to be able to tweak the fedora_datastreams_ms facet so that it only provides the DSIDs you want as options. Something to think about.
Reply all
Reply to author
Forward
0 new messages