Joseph, if the fields do not exist in solr, you will get unrelated hits.
Verify that all the fields you need are indexed and searchable in solr.
Mark
On Fri, Nov 18, 2011 at 8:30 AM, Joseph <[email protected]> wrote:
> Dear DSpace Developers,
>
> [DSpace 1.7.2, XMLUI + Discovery]
>
> I'm using trying to use the related items component of DSpace Discovery
> but I need a bit of help with setting up the solr query.
>
> Goal:
> I have items in the archive that are derivative of other items in the
> archive (in this case images and 3D scans of archaeological artifacts)
> I have a field, dc.identifier.barcode which is an internal identifier from
> our lab, and I use the field dc.relation.isformatof in the derivative items
> to refer to the barcode identifier.
> What we'd like is
> A) The original items to have "Related Items" links to their derivative
> works
> B) The derivative items to have "Related Items" linked back to the
> original item.
>
> Original [Dspace 1.7.2] RelatedItems.java pertinent lines [133-141]
>
> 1 this.queryArgs = prepareDefaultFilters(getView());
> 2 this.queryArgs.setRows(1);
> 3
> this.queryArgs.add("fl","dc.contributor,dc.contributor.author,handle");
> 4 this.queryArgs.add("mlt","true");
> 5
> this.queryArgs.add("mlt.fl","dc.contributor,dc.contributor.author,handle");
> 6 this.queryArgs.add("mlt.mindf","1");
> 7 this.queryArgs.add("mlt.mintf","1");
> 8 this.queryArgs.setQuery("handle:" + dso.getHandle());
> 9 this.queryArgs.setRows(1);
>
> Understanding in English:
> From what I understand of the above code (slightly reordered but
> including line reference):
> 1) get the default filters
> 8) query for handle=dso.getHandle \\The current item handle
> 2) return only one result
> 3) return only the following fields "dc.contributor,
> dc.contributor.author, handle"
> 4) we want more like the results of the simple query
> 5) While searching for more like this, only return "dc.contributor,
> dc.contributor.author, handle"
> 6) While searching for more like this, only return documents that
> have at least one term in common, and it must occur at least once.
> 7) While searching for more like this, only use terms that occur at
> least once in a source document \\ ie the document that is the result of
> the original query
> 9) return only one result \\ Again?
>
> Ideas to accomplish goal above:
> I thought that I could probably just replace the filter terms in lines
> 3, and 5 above with
> "dc.identifier.barcode, dc.relation.isformatof, handle"
> This did not yield the desired results. Testing it on the Dspace
> instance, I recieved several false "Related Items" without a
> quickly discernible pattern to them.
>
> I also tried adding the line
> this.queryArgs.add("mlt.qf",
> "dc.identifier.barcode,dc.relation.isformatof");
> With the hopes of specifying the query fields. It did the same thing.
>
> Request:
> Does anyone have any ideas or experience with this?
>
> I noticed that in DSpace 1.8 that the guts of in "RelatedItems.java" was
> commented out.
> Is this a part of discovery that is being abandoned?
> Or is there some other mechanism that does the same thing?
>
> Thank You,
> Joseph
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> 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
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel