Version 10 (modified by 15 years ago) ( diff ) | ,
---|
Mime Type Calculation and Indexing
Date | 2010/04/14 |
Contact(s) | Simon Pigot |
Last edited | Timestamp |
Status | Complete |
Assigned to release | 2.5.0 |
Resources | Available |
Overview
GeoNetwork uses different code in a few places to calculate mime types for files that are uploaded with metadata records as online resources (usually based on filenames). However the mime type is never indexed with the metadata record that points to the resource and the mime type calculation is usually done based on the filename so may not reflect the true content of the file or return the correct registered mime type for alternatives. This means that searches cannot be done on the content of online resources.
Proposal Type
- Sandbox: BlueNetMEST
- App: GeoNetwork
- Module: Lucene Index, Metadata schemas
Links
- Documents: mime-util
Voting History
- Vote proposed.
Motivations
The motivation for this proposal is to get the mime type into the Lucene index for use by that do searches via CSW to determine whether GeoNetwork has metadata records with attached online resources that could be of interest. The particular use case this was developed for is a data visualization program which wanted to search the GeoNetwork catalog for files of interest.
Proposal
This proposal implements:
- Mime type calculation for online resources using mime-util immediately after a metadata record is saved/imported in update-fixed-info.xsl.
- Indexing of the mime type in Lucene by index-fields.xsl
- Inclusion of the mime type Lucene field as an AdditionalQueryable in the CSW config.
Mime-util has a plugin architecture to support the addition of new ways to calculate mime types plus a simple file where unregistered types can be added.
At this stage the proposal does not:
- include adding a search field in the advanced search interface
- replace mime type calculations done elsewhere (specifically in Jeeves src/jeeves/util/BinaryFile.java and in metadata-iso19139.xsl) in GeoNetwork with mime-util code or the results of mime-util
These can be done at a later date.
Risks
At present the only reasonable place for storing the mime type in the onlineresource field is as a uuid attribute of the gmd:linkage element. If an element/attribute is not used then the mime type will have to be calculated at the time of indexing - this may slow down indexing of many records with attached online resources.
Participants
- CSIRO: Gary Carroll and Uwe Rosebrock
Attachments (1)
- patch.TemporalExtentSearchAndMimeTypeCalculation (287.5 KB ) - added by 15 years ago.
Download all attachments as: .zip