[
https://jira.duraspace.org/browse/DS-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26095#comment-26095
]
Kostas Stamatis commented on DS-1223:
-------------------------------------
Hi Andrea,
to be honest, I tried not to change anything than the necessary from the
BrowseDAO classes, thus, I guess, the resulting queries are the same used by
DSpace itself.
I think the problem is that in our case, finally, we don't want to end up with
small number of items (i.e: 20 terms with the current default pagination
configuration) because we want to count the indices... so we need all the items
to apply a COUNT aggregation method.
There are 2 cases:
1) Browsing from the home screen (no community or collection is defined): The
resulting query is the following:
SELECT COUNT(*) AS num, bi_4_dis.value, bi_4_dis.authority FROM bi_4_dis,
(SELECT bi_4_dmap.distinct_id FROM bi_4_dmap) mappings WHERE
bi_4_dis.id=mappings.distinct_id GROUP BY bi_4_dis.value, bi_4_dis.authority,
bi_4_dis.sort_value ORDER BY sort_value ASC NULLS LAST LIMIT ?
2) Browsing within a community or collection: The resulting query is the
following:
SELECT COUNT(*) AS num, bi_4_dis.value, bi_4_dis.authority FROM bi_4_dis,
(SELECT bi_4_dmap.distinct_id FROM collection2item, bi_4_dmap WHERE
bi_4_dmap.item_id=collection2item.item_id AND collection2item.collection_id=? )
mappings WHERE bi_4_dis.id=mappings.distinct_id GROUP BY bi_4_dis.value,
bi_4_dis.authority, bi_4_dis.sort_value ORDER BY sort_value ASC NULLS LAST
LIMIT ?
(collection2item table must be replaced by community2item table in the case of
browsing within a community)
In case when the frequencies are disabled the following SQL statements take
place:
SELECT bi_2_dis.* FROM bi_2_dis ORDER BY sort_value ASC NULLS LAST LIMIT ?
(browsing from home screen)
and
SELECT bi_2_dis.* FROM bi_2_dis, (SELECT DISTINCT bi_2_dmap.distinct_id FROM
collection2item, bi_2_dmap WHERE bi_2_dmap.item_id=collection2item.item_id AND
collection2item.collection_id=? ) mappings WHERE
bi_2_dis.id=mappings.distinct_id ORDER BY sort_value ASC LIMIT ?
Notice in the above SQL that the DISTINCT directive in not present in our SQL
query!
Should you need any help for the testing, please contact me here or directly.
> Display frequencies of items in single browsing for selected indices
> --------------------------------------------------------------------
>
> Key: DS-1223
> URL: https://jira.duraspace.org/browse/DS-1223
> Project: DSpace
> Issue Type: Improvement
> Components: JSPUI
> Affects Versions: 1.8.2
> Reporter: Christina Paschou
> Labels: has-patch, has-pull-request
> Attachments: browse_frequencies.diff, README.txt
>
>
> DSpace provides by default two types of browsing, naming them single browsing
> and full browsing according to the corresponding names of the .jsp files that
> are responsible for handling each request (single.jsp & full.jsp).
> Each type of browsing is defined accordingly and configured in different way
> in the configuration file dspace.cfg.
> The proposed improvement is applied for the case of browsing by a unique
> index of metadata values from the item (single browsing). In this case, the
> user can define for each metadata browse index whether he wishes to add next
> to its various metadata values the frequencies of items that are included.
> The configuration takes place in the dspace.cfg.
> Examples:
> http://phdtheses.ekt.gr/eadd/browse?type=subject
> http://phdtheses.ekt.gr/eadd/browse?type=country
> http://phdtheses.ekt.gr/eadd/browse?type=language
> Attached you can find the patch file and a readme file with details about tha
> configuration that is needed to be made.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel