I feel the problem is not with the postgres version. If you look into
org.dspace.browse.BrowseItem.java you can see the below SQL's holding
the values for browse display and you can notice the query is not
ordered by the text_value. We have our dspace running on 1.4.2 and I'm
not sure whether it's already been taken care in 1.5 version.

You need to change it as below and run your build script for compiling
the class to make the browse display ordered by Author


/** query to get the text value of a metadata element only (qualifier is
NULL) */
    private String getByMetadataElement = "SELECT
text_value,text_lang,element,qualifier FROM metadatavalue,
metadatafieldregistry, metadataschemaregistry " +
                                    "WHERE metadatavalue.item_id = ? " +
                                    " AND
metadatavalue.metadata_field_id =
metadatafieldregistry.metadata_field_id " +
                                    " AND metadatafieldregistry.element
= ? " +
                                    " AND
metadatafieldregistry.qualifier IS NULL " +
                                    " AND
metadatafieldregistry.metadata_schema_id=metadataschemaregistry.metadata
_schema_id " +
                                    " AND
metadataschemaregistry.short_id = ? order by text_value";
    
        /** query to get the text value of a metadata element and
qualifier */
    private String getByMetadata = "SELECT
text_value,text_lang,element,qualifier FROM metadatavalue,
metadatafieldregistry, metadataschemaregistry " +
                                    "WHERE metadatavalue.item_id = ? " +
                                    " AND
metadatavalue.metadata_field_id =
metadatafieldregistry.metadata_field_id " +
                                    " AND metadatafieldregistry.element
= ? " +
                                    " AND
metadatafieldregistry.qualifier = ? " +
                                    " AND
metadatafieldregistry.metadata_schema_id=metadataschemaregistry.metadata
_schema_id " +
                                    " AND
metadataschemaregistry.short_id = ? order by text_value";
    
        /** query to get the text value of a metadata element with the
wildcard qualifier (*) */
    private String getByMetadataAnyQualifier = "SELECT
text_value,text_lang,element,qualifier FROM metadatavalue,
metadatafieldregistry, metadataschemaregistry " +
                                    "WHERE metadatavalue.item_id = ? " +
                                    " AND
metadatavalue.metadata_field_id =
metadatafieldregistry.metadata_field_id " +
                                    " AND metadatafieldregistry.element
= ? " +
                                    " AND
metadatafieldregistry.metadata_schema_id=metadataschemaregistry.metadata
_schema_id " +
                                    " AND
metadataschemaregistry.short_id = ? order by text_value";



Cheers,
Sri

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Blanco,
Jose
Sent: 05 August 2008 19:07
To: [email protected]
Subject: [Dspace-tech] Author sorting

I was hoping that the our new version of postgres ( 8.1.11 ) would solve
the problem we see when authors are browsed.  Here is the problem:

Suppose we have the following 3 authors:

 Ta, A
 Ta, Z
 Tab, A

I would expect them to show up in the oder shown above when browsing by
author, but instead I get:

 Ta, A
 Tab, A
 Ta, Z

Which as you can see is not really the desired behavior. I created a
test table and loaded these values into a field of type text, and then
issued the following query:

 select * from test order by 1;
   a    
--------
 Ta, A
 Tab, A
 Ta, Z
(3 rows)

So I can see why Dspace is displaying this in this order.

The funny thing is that I'm fairly certain that I have seen the desired
ordering in some Dspace instances, so I'm not sure why ours is not
sorting correctly.  I'm running dspace 1.5.  Does this have to do with a
postgres or dspace setting?

Thank you!
Jose

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to