Re: [greenstone-users] I can't sort by date my documents

From John Rowe
DateFri, 5 Jan 2007 17:05:50 +1300
Subject Re: [greenstone-users] I can't sort by date my documents
In-Reply-To (BAY135-F392849899C34F1E514C060D6B80-phx-gbl)
Hi,

The following line in your collect.cfg:

classifyHierarchy -metadata dc.Date^created -sort dc.Date -
allvalues -buttonname "Clasificacion cronologica"

instructs Greenstone to sort the *classifiers* by dc.Date, it however does not affect the sorting of the search results.

The bad news is that when using the indexing engines MG or MG++ you
cannot rank search results by anything other than relevance. To be
able to sort search results you need to use a newer indexing engine,
to be specific you need to use Lucene.
To switch Greenstone to using Lucene you need a Greenstone version
higher than 2.71 (to do search result sorting) and to change the
build type to lucene in the collect.cfg by changing the line that reads:

buildtypemgpp

to:

buildtypelucene

Then you need to tell Greenstone the index you want to sort by. The
easiest way is to set a CGI argument default by putting this at the
bottom of your collect.cfg:

cgiargshortname=sf argdefault=DC

As an explanation for the above, the "sf" part refers to the search
ordering argument and the DC comes from your build.cfg's mapping for
dc.Date from this file:

http://80.34.53.155/gsdl/collect/tuineje/index/build.cfg

I hope this helps!

Cheers,
John Rowe
Business Development Manager

DL Consulting
Greenstone Digital Library and Digitisation Specialists
johnr@dlconsulting.com
www.dlconsulting.com


On 5/01/2007, at 10:59 AM, César López Molero wrote:

> Hello:
>
> I've made a Greenstone collection in www.ayuntamientotuineje.com/
> archivo.html
> When I do a Search with the word, for example, "tiscamanita" there
> appeares the files which contains that word and I want to be sort
> by the metadata "dc.Date". But the first that appeares is from
> 1891, after 1889, 1850, 1870... THERE IS NO ORDER IN THE DATE AND
> I'VE USED THE DC.DATE METADATA
>
> The values i am giving to this metadata files are in the format
> year-month-day, 1900-12-15, 1850-01-30... and the rest have the
> same format.
>
> Can you telll me where is the problem?
>
> The collect.cfg file is the next :
> ---------------------------------------------------------------------- > ------------------------------------------------------------
> creatorclmolero@hotmail.com
> maintainerclmolero@hotmail.com
> publictrue
>
> searchtypeplain
>
> buildtypemgpp
>
> #indexesdocument:text document:Title document:Source
> indexestext dc.Date,text dc.Date,dc.Title
> levelsdocument
> defaultindex
>
> classifyHierarchy -metadata dc.Date^created -sort dc.Date -
> allvalues -buttonname "Clasificacion cronologica"
>
> classifyHierarchy -metadata dc.Subject -sort dc.Date -buttonname
> "Clasificacion tematica"
>
> pluginZIPPlug
> pluginGAPlug
> pluginTEXTPlug
> pluginHTMLPlug -smart_block
> pluginEMAILPlug
> pluginPDFPlug
> pluginRTFPlug
> pluginWordPlug
> pluginPSPlug
> pluginImagePlug
> pluginISISPlug
> pluginNULPlug
> pluginArcPlug
> pluginRecPlug -use_metadata_files
>
> format DateList "<td>[link][icon][/link]</td>
> <td>[highlight]{Or}{[dls.Title],[dc.Title],[ex.Title],Untitled}[/
> highlight]</td>
> <td>[ex.Date]</td>"
>
> format HList "[link][highlight][ex.Title][/highlight][/link]"
>
> format VList "<td valign="top">[link][icon][/link]</td>
> <td valign="top">[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}
> [ex./srclink]</td>
> <td valign="top">[highlight]
> {Or}{[dls.Title],[dc.Title],[ex.Title],Untitled}
> [/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td>"
>
> format DocumentHeading "{Or}{[parent(Top):Title],[Title],untitled}
> <br>"
>
> format DocumentText "[Text]"
>
> format DocumentButtons "Detach|Highlight"
>
> collectionmetacollectionname [l=es] "Tuineje"
> collectionmetacollectionextra [l=es] "Archivo historico del > municipio de Tuineje. Coleccion de casi tres mil actas repartidas a > lo largo del siglo XIX"
> collectionmeta.document:text [l=es] "text"
> collectionmeta.document:Title [l=es] "titles"
> collectionmeta.document:Source [l=es] "filenames"
> collectionmetaiconcollection [l=es] "/gsdl/images/actas19.gif"
> collectionmeta.text [l=es] "text"
> collectionmeta.document [l=es] "document"
> collectionmeta.dc.Date,text [l=es] "Fecha"
> collectionmeta.dc.Date,dc.Title [l=es] "Titulo"
> collectionmetaiconcollectionsmall [l=es] "/gsdl/images/
> actaspequeno.jpg"
> ---------------------------------------------------------------------- > ------------------------------------------------------------
>
> _________________________________________________________________
> Descubre la descarga digital con MSN Music. Más de un millón de > canciones. http://music.msn.es/
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users