Brian, Thank you. The code that you referenced seems to have solved my problem.
Terry On Mon, Aug 11, 2014 at 11:09 AM, Brian Freels-Stendel <[email protected]> wrote: > Hi Terry, > > > > I’m sorry, I wasn’t clear. I was thinking that you could use one of those > settings as a sort of template to inform you how to exclude those items > from the More Like This list. > > > > For example, check > [dspace-src]/dspace-xmlui/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceFeedGenerator.java > at line 294, ‘if (!includeRestrictedItems)’. > > > > B-- > > > > *From:* Terry Brady [mailto:[email protected]] > *Sent:* Monday, August 11, 2014 12:00 PM > *To:* Brian Freels-Stendel > > *Subject:* Re: [Dspace-tech] More Like This - Only Show Items with > Anonymous Access > > > > Brian, thanks for the note. I double-checked these settings and I have > those properties set as you recommend. > > > > harvest.includerestricted.rss = false > > harvest.includerestricted.oai = false > > harvest.includerestricted.subscription = false > > > > Thanks, Terry > > > > > > On Mon, Aug 11, 2014 at 10:43 AM, Brian Freels-Stendel <[email protected]> > wrote: > > Hi Terry, > > > > I’m wondering if you might be able to use the “Restricted item visibility > settings” as a guide. In dspace.cfg, there are three things that cut those > items out of results: > > > > harvest.includerestricted.rss = false > > harvest.includerestricted.oai = false > > harvest.includerestricted.subscription = false > > > > Searching on ‘includerestricted’ will show how/where it’s being done for > those services. > > > > B-- > > > > *From:* Terry Brady [mailto:[email protected]] > *Sent:* Monday, August 11, 2014 11:07 AM > *To:* [email protected] > *Subject:* Re: [Dspace-tech] More Like This - Only Show Items with > Anonymous Access > > > > I am still looking for some advice on this question. I appreciate any > advice that you can offer. > > > > The MoreLikeThis feature will return items that are inaccessible to > anonymous users. Has anyone else encountered this issue? > > > > If I have an instance of a DSpaceItem, what methods can I call to > determine if that object is accessible to anonymous users? > > > > Thanks, Terry > > > > On Wed, Aug 6, 2014 at 3:48 PM, Terry Brady <[email protected]> > wrote: > > I would like to restrict MoreLikeThis results to only include items with > anonymous access. > > > > In order to do this, I believe that I will need to modify > org.dspace.discovery.SolrServiceImpl.getRelatedItems() > > > > I have attempted to supply additional parameters to the solr query to > return only items with a read group of "g0", but I have not had success. > > > > As a secondary option, I would like to check the accessibility of results. > > > > NamedList mltResults = (NamedList) > rsp.getResponse().get("moreLikeThis"); > > if(mltResults != null && mltResults.get(item.getType() + "-" + > item.getID()) != null) > > { > > SolrDocumentList relatedDocs = (SolrDocumentList) > mltResults.get(item.getType() + "-" + item.getID()); > > for (Object relatedDoc : relatedDocs) > > { > > SolrDocument relatedDocument = (SolrDocument) > relatedDoc; > > DSpaceObject relatedItem = findDSpaceObject(context, > relatedDocument); > > if (relatedItem.getType() == Constants.ITEM) > > { > > results.add((Item) relatedItem); > > } > > } > > } > > > > What is the proper way to check if a DSpace Item is accessible to > anonymous? > > > > -- > > Terry Brady > > Applications Programmer Analyst > > Georgetown University Library Information Technology > > https://www.library.georgetown.edu/lit/code > > 425-298-5498 > > > > > > -- > > Terry Brady > > Applications Programmer Analyst > > Georgetown University Library Information Technology > > https://www.library.georgetown.edu/lit/code > > 425-298-5498 > > > > > > -- > > Terry Brady > > Applications Programmer Analyst > > Georgetown University Library Information Technology > > https://www.library.georgetown.edu/lit/code > > 425-298-5498 > -- Terry Brady Applications Programmer Analyst Georgetown University Library Information Technology https://www.library.georgetown.edu/lit/code 425-298-5498
------------------------------------------------------------------------------
_______________________________________________ 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

