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

From Katherine Don
DateMon, 08 Jan 2007 12:18:01 +1300
Subject Re: [greenstone-users] I can't sort by date my documents
In-Reply-To (BAY135-F392849899C34F1E514C060D6B80-phx-gbl)
Hi César

As John said, you need to use Lucene as your indexer. If you are using
2.71 or later, this will automatically give a "sort by" option on the
search page - you will be able to sort by any metadata that an index was
built on.

You should change your indexes to be
indexestext dc.Date dc.Title

The way you have it set up, you are indexing text and date twice.
The sorting is independent of which field you are searching, so you
don't need to include date in each index field.

Regards,
Katherine

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 :
> ----------------------------------------------------------------------------------------------------------------------------------
>
> creator clmolero@hotmail.com
> maintainer clmolero@hotmail.com
> public true
>
> searchtype plain
>
> buildtype mgpp
>
> #indexes document:text document:Title document:Source
> indexes text dc.Date,text dc.Date,dc.Title
> levels document
> defaultindex
>
> classify Hierarchy -metadata dc.Date^created -sort dc.Date
> -allvalues -buttonname "Clasificacion cronologica"
>
> classify Hierarchy -metadata dc.Subject -sort dc.Date -buttonname
> "Clasificacion tematica"
>
> plugin ZIPPlug
> plugin GAPlug
> plugin TEXTPlug
> plugin HTMLPlug -smart_block
> plugin EMAILPlug
> plugin PDFPlug
> plugin RTFPlug
> plugin WordPlug
> plugin PSPlug
> plugin ImagePlug
> plugin ISISPlug
> plugin NULPlug
> plugin ArcPlug
> plugin RecPlug -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"
>
> collectionmeta collectionname [l=es] "Tuineje"
> collectionmeta collectionextra [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"
> collectionmeta iconcollection [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"
> collectionmeta iconcollectionsmall [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
>
>