Mark,

Another approach would be to write a customized REST endpoint that will
query SOLR using the DSpace API.

If you go with this approach, you can store your custom endpoint in
dspace/modules/rest.

We had some legacy code that queried SOLR directly.  We have been able to
replace that legacy code with a new custom endpoint.

If this approach sounds useful, I will be happy to share some example code.

     DiscoverQuery query = new DiscoverQuery();
    query.setQuery(search);
    query.setMaxResults(rows);
    query.setStart(from);
    DiscoverResult discoverResult = null;
    if (scopeHandle != null) {
    DSpaceObject obj = HandleManager.resolveToObject(context,
scopeHandle.trim());
    if (obj != null) {
    discoverResult = SearchUtils.getSearchService().search(context, obj,
query);
    }
    }

    if (discoverResult == null){
    discoverResult = SearchUtils.getSearchService().search(context, query);

    }


Terry

On Thu, Feb 11, 2016 at 12:31 PM, Mark Ehle <[email protected]> wrote:

> Ok - making progress with querying dspace's SOLR and then using REST. But
> - how do you find the primary bitstream thumbnail? I can get a list of
> bitstreams and find the thumbnails, but if there are more than one, there
> is no indication which is which.
>
> On Wed, Feb 10, 2016 at 7:58 AM, helix84 <[email protected]> wrote:
>
>> Hi Mark,
>>
>> DSpace REST API doesn't have an endpoint for search at this time
>> (although there is an endpoint to find item by metadata value:
>> /items/find-by-metadata-field). I recommend using Solr for search
>> until we have a REST endpoint for Discovery (we won't have one yet as
>> of DSpace 6).
>>
>>
>> Regards,
>> ~~helix84
>>
>> Compulsory reading: DSpace Mailing List Etiquette
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
425-298-5498 (Seattle, WA)

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to