On Wed, Oct 31, 2012 at 9:55 PM, Sara Amato <[email protected]> wrote:

> I'm trying out the Discovery module for the first time.  It's WONDERFUL!


Hi Sara,

nice to hear that!

Keep in mind that enabling Discovery might require you to give Tomcat a
little extra memory. Just remember that in case you run into any memory
problems.


> I've been able to successfully add facets for data from items (e.g.
> dc.description), but am failing to create a facet using bitstream metadata.
> (e.g. dc.format.mimetype) .   Is it possible to use the bitstream metadata
> as a facet?
>

I don't think you're doing it right. Bitstreams currently don't have
metadata like items do. What you're referring to is not in out-of-the-box
DSpace, if you have such metadata, it must be some customization you made
to the *item* metadata.

Therefore it isn't in Solr, either.

Alternatively,  I'd be happy with any way to get a count of numbers of
> particular mime types in a collection, e.g. Jpgs (2020) ; PDF (253) .
> I've been trying was trying get this via solr but I'm guessing the
> bitstream level data isn't in there????
>

Here's how you can get the list using SQL:

To list all bitstream names:

SELECT bitstream.nameFROM bitstream,bitstreamformatregistryWHERE
bitstreamformatregistry.bitstream_format_id =
bitstream.bitstream_format_idAND bitstreamformatregistry.mimetype =
'application/pdf'


To list only bitstream names from a collection specified by handle:

SELECT bitstream.nameFROM
bitstream,bitstreamformatregistry,bundle2bitstream,item2bundle,collection2item,handleWHERE
collection2item.collection_id=handle.resource_idAND
collection2item.item_id=item2bundle.item_idAND
bundle2bitstream.bundle_id=item2bundle.bundle_idAND
bundle2bitstream.bitstream_id=bitstream.bitstream_idAND
bitstreamformatregistry.bitstream_format_id =
bitstream.bitstream_format_idAND bitstreamformatregistry.mimetype =
'application/pdf'AND handle.handle='123456789/123';

It will work only for collections, but you can analogically use
natural join on the community2collection table if you want to use
communities.

To to get only the count, change the first line to

SELECT count(bitstream.name)


Hope that helps and good luck with your Discovery experiments. If you
run into anything that you don't understand and can't find
documentation for, don't hesitate to ask.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to