|
From: Greenstone D. L. T. <gre...@wa...> - 2026-05-04 01:14:52
|
Hi Will, Sorry, it appears our sourceforge forum is no longer forwarding messages to our mailing list. We never think to check it either. I'll have a think about whether we keep the discussion forum and have it forward to our sourceforge mailing list, or maybe we disable the forum and just use the mailing list. For a greenstone document made up of sections, generally the top section contains all the document metadata - the main title, authors, dates etc. section levels get their own title and often that is all. In search results, if you want to display document metadata, then you need to use a select attribute on your gsf:metadata element: <gsf:metadata name="dc.Title" select="root"/> For more info see https://wiki.greenstone.org/doku.php?id=en:user:gs3_format_statements#select If you want a search on say dc.Title to return all the sections whose top level dc.Title matches, then you need to add the build option "-sections_index_document_metadata <value>" - this will add the top document level metadata into the index for each section. values are: -sections_index_document_metadata <enum> Add document level metadata at section level for indexing never: Don't add any document metadata at section level. always: Add all specified document level metadata even if section level metadata of that name exists. unless_section_metadata_exists: Only add document level metadata if no section level metadata of that name exist Grouping search results by Title. Hmmm. Have never thought about this before. We tend to view the search results as a linear list. Generally search results are returned in a ranked order - those matching the query terms more often come higher up the list of results. If you are using Lucene or SOLR as your indexer, you can specify sort fields for the index, and then search results can be sorted by this field. You could try adding dc.Title to your sort fields, and making that the default sort option. There wouldn't be grouping as such, but all sections with the same dc.Title would be next to each other in the list. (This would need the -sections_index_document_metadata always|unless_section_metadata_exists option) You do lose ranking using a sort field though. Regards, Katherine ________________________________ From: Will Gomes <wi...@mt...> Sent: Monday, 4 May 2026 11:57 am To: gre...@li... <gre...@li...> Subject: [Greenstone-users] Search Formatting You don't often get email from wi...@mt.... Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> I posted this back in January in the Help Forum on sourceforge, but didn't get a response, so thought no one was monitoring. So I am trying here since I saw some recent activity :-) . I set up Greenstone with PDF documents. Search works as expected, but I was trying to customize the search results when doing section level search. The results only seem to display the section (Page 1, Page 10, etc). I was trying to display additional metadata such as dc.Title in the results. They don't appear to be returned in the results XML. Ideally I would also like to group the page level results by title as well. I couldn't find any documentation on configuring this. Is this doable? Thanks for any assistance |