You might also look at DSIndexer.java, you can comment out the actual
indexing of the Communtiy/Collection objects, then they will not be
returned at all.

TBH, I've never found this feature of search very useful at all.

Mark

On Fri, Jan 13, 2012 at 9:43 AM, Patrick Etienne <
[email protected]> wrote:

> DSpace Techs & Devs,
>
> Greetings all, I'm working on a grant funded initiative for the University
> System of Georgia which involves several (10 at the moment) different
> academic institutions across the state of Georgia, all but two of whom are
> running DSpace for their repository software. One of our deliverables for
> the grant is a meta-repository covering communities, collections and items
> for all the involved institutions. One constraint of the project is that
> rather than providing users with an organization of content via
> communities, collections and items, we're offering instead "Disciplines"
> and items. A discipline is just a DSpace community but this organization
> has allowed us a way to incorporate all institutions' records into a
> subject hierarchy that makes sense for all institutions. In effort toward
> reaching this goal, we've hidden or removed all references to collections
> within the meta-repository... except for one.
>
> The one reference to DSpace collections that we've been unable to remove
> or shows up on DSpace's search results pages. When displaying search
> results the first results are communities relevant to the search term(s).
> The second set of results are those where the communities are relevant to
> those terms. After this of course, the relevant items are show. I've been
> able to modify the AbstractSearch.java in such a way that collection *
> references* are not added to the *referenceSet*, the result of which is
> that collections are not displayed in the search results. However, because
> of the way that I've achieved this, the "numbering" of items is off-kilter
> and strange (to the user) but predictable things happen. Rather than
> describing (which is difficult) I'll offer an example (which should make
> the problem and behavior completely clear).
>
> Example:
> Let's say we do a search for "biology". The query returns, say, 30
> records. There are 6 communities, 11 collections, and 13 items. With this
> being the case, there are (by default) 3 pages of results with 10 results
> per page. After the customization to the AbstractSearch class (shown below)
> the behavior of the interface is as follows - On the first page, there are
> 6 results shown, all 6 being community results (4 missing collections). On
> the second page there are 3 results, all items (7 missing collections). On
> the third page there are 10 results, all items.
>
> AbstractSearch.java beginning at line 282:
>
>                     if (resultDSO instanceof Community
>                         //    || resultDSO instanceof Collection
>                         )
>                     {
>                         if (referenceSet == null) {
>                             referenceSet =
> results.addReferenceSet("search-results-repository",
>
> ReferenceSet.TYPE_SUMMARY_LIST,null,"repository-search-results");
>                             // Set a heading showing that we will be
> listing containers that matched:
>                             referenceSet.setHead(T_head2);
>                             resultsContainsBothContainersAndItems = true;
>                         }
>                         referenceSet.addReference(resultDSO);
>                     }
>
> All that has been done in modifying the code was to comment out the adding
> of resultDSO objects when they are instanceof Collection. This prevents
> those *references* from being added to the *referenceSet*. I've been
> digging through the code in attempt to understand how the search results
> pages are built so that I may find an appropriate place higher up the chain
> to make my modification, specifically so that individual search results
> pages are built without awareness of Collection objects - which would
> (theoretically) alleviate our difficulty. In searching through the code,
> I've found of course that the QueryResults, QueryArgs,
> AbstractDSpaceTransformer, AbstractWingTransformer, and DSpaceTransformer
> classes are all in some way related, and that QueryResults especially seems
> pivotal, but I've not been able to understand how the pieces come together
> well enough to figure how where I might make changes to complete this last
> piece of our collection references puzzle.
>
> If anyone has tips, hints, suggestions or resources toward a solution on
> this issue, it'd be greatly appreciated.
>
> Many Thanks,
>
>  - Patrick E.
>
> As a sidenote, I've been attempting to integrate my development DSpace
> instance(s) into my IDE (Eclipse in my case). My hope was that I could
> enable tomcat debugging and... attach source code to execution code so that
> I could create break points and step through the code. I wanted to
> accomplish this so that I could provide more detail when emailing the list,
> but I've not yet been able to accomplish this with the DSpace software. But
> that integration is something that I've been unable to accomplish for a
> couple years now, so that's really a different subject. Point being I was
> making the effort to provide as much detail for this issue as possible.
>
> Patrick K. Etienne
> Systems Analyst
> Georgia Institute of Technology
> Library & Information Center
> (404) 385-8121
>
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Mar 27 - Feb 2
> Save $400 by Jan. 27
> Register now!
> http://p.sf.net/sfu/rsa-sfdev2dev2
> _______________________________________________
> Dspace-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-devel
>
>


-- 
[image: @mire Inc.]
*Mark Diggory*
*2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010*
*Esperantolaan 4, Heverlee 3001, Belgium*
http://www.atmire.com
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to