Hi Jørn
The problem seem that orgName is a tokenized field and is not valid for
sorting. Not sure at all why it doesn't appear always the error (probably
doesn't fail if all results contain only one word for organization).
If you see the index-fields.xsl for metadata title, has 2 lucene fields:
<Field name="title" string="{string(.)}" store="true" index="true"
token="true" />
*<!-- not tokenized title for sorting -->*
*<Field name="_title" string="{string(.)}" store="true" index="true"
token="false"/>*
You need to use *_title* for sorting and can define a similar field for
organization:
<Field name="orgName" string="{string(.)}" store="true" index="true"
token="true"/>
*<!-- not tokenized orgName for sorting -->*
*<Field name="_**orgName" string="{string(.)}" store="true" index="true"
token="false"/>*
Note that you need to reindex metadata from Administration panel after the
change
Regards,
Jose García
GeoCat bv
http://geocat.net
On Fri, Jan 20, 2012 at 1:07 PM, Jørn-Vegard Røsnes <jorn@anonymised.com>wrote:
Hi all,
by utilizing Luke, I browsed the GeoNetwork Lucene index
(webapps/geonetwork/WEB-INF/lucene).
I found orgName in the index, so I tried sortBy=orgName
http://hostname/geonetwork/srv/en/main.search?any=map&sortBy=orgName
(or xml.search)
returns a different order than
http://hostname/geonetwork/srv/en/xml.search?any=map&sortBy=title
http://hostname/geonetwork/srv/en/xml.search?any=map
But after a while/"many requests" I get an error message:
"RuntimeException : there are more terms than documents in field
"orgName", but it's impossible to sort on tokenized fields"
After Tomcat restart it works for a while again.
It would have been nice to be able to sort by some kind of "publisher".
orgName (in Lucene index) could have been a good candidate for this.
Have you tried something similar or an idea about how much effort
orgName-sorting requires?
--
kind regards
Jørn-Vegard Røsnes
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork