We had a similar need.  Our library discovery layer pulls content from
DSpace using the OAI harvester.

We needed to distinguish full text content from non-full text content in
our OAI metadata.  We noticed that we could key off of data within the
dc.provenance field.

Here is an SQL version of the query we ran for this purpose.

    and exists
    (
      select 1
      from metadatavalue m
      where m.item_id = i.item_id
      and m.metadata_field_id = (
        select metadata_field_id from metadatafieldregistry mfr
        where mfr.element = 'description' and mfr.qualifier = 'provenance'
      )
      and (text_value ~ '^.*No\. of
bitstreams.*\.(PDF|pdf|DOC|doc|PPT|ppt|DOCX|docx|PPTX|pptx).*$')
    )

Terry



On Mon, Jan 26, 2015 at 1:07 AM, Hayles, Steven <[email protected]>
wrote:

> Under DSpace 4.2, I have a requirement provide a search option to show
> results only for items with full text available.  I've added a check box
> (uolfulltext) to the search forms, and the following to
> DiscoverySearchRequestProcessor.doSimpleSearch in
> dspace-jspui/src/main/java/org/dspace/app/webui/discovery/DiscoverySearchRequestProcessor.java
>
> --- DiscoverySearchRequestProcessor.java.orig   2014-07-21
> 14:05:07.000000000 +0100
> +++ DiscoverySearchRequestProcessor.java        2015-01-25
> 20:20:50.533895183 +0000
> @@ -251,6 +251,11 @@
>          DiscoverQuery queryArgs =
> DiscoverUtility.getDiscoverQuery(context,
>                  request, scope, true);
>
> +       if (request.getParameter("uolfulltext") != null)
> +       {
> +            queryArgs.addFieldPresentQueries("fulltext");
> +        }
> +
>
>  queryArgs.setSpellCheck(discoveryConfiguration.isSpellCheckEnabled());
>
>          List<DiscoverySearchFilterFacet> availableFacet =
> discoveryConfiguration
>
> Is this a sensible approach? Have I missed anything?
>
> Thanks
>
> Steven
>
> Steven Hayles
> Systems Analyst
>
> IT Services, University of Leicester,
> Propsect House, 94 Regent Rd, Leicester, LE1 7DA, UK
>
> T: +44 (0)116 229 7950
> E: [email protected]
>
> The Queen’s Anniversary Prizes 1994, 2002 & 2013
> THE Awards Winners 2007-2013
>
> Elite without being elitist
>
> Follow us on Twitter http://twitter.com/uniofleicester or
> visit our Facebook page https://facebook.com/UniofLeicester
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
425-298-5498
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to