Changes between Version 13 and Version 14 of MimeTypeCalculationIndexing
- Timestamp:
- 04/16/10 04:54:20 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MimeTypeCalculationIndexing
v13 v14 10 10 == Overview == 11 11 12 !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 n everindexed 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.12 !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 not 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. 13 13 14 14 === Proposal Type === … … 27 27 == Motivations == 28 28 29 The motivation for this proposal is to get the mime type into the Lucene index for use by that do searches via CSWto 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.29 The motivation for this proposal is to get the mime type into the Lucene index for use by applications that do searches via CSW/etc 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. 30 30 31 31 == Proposal == … … 35 35 * Mime type calculation for online resources (gmd:protocol fields that start with WWW:DOWNLOAD or WWW:LINK - others can be added if required by individual sites) using [http://mime-util.sourceforge.net mime-util] immediately after a metadata record is saved/imported in update-fixed-info.xsl. 36 36 * Calculated mime type is stored in metadata record as gmx:MimeFileType child of gmd:name (replaces gco:CharacterString) and will look like the following example: 37 {{ 37 {{{ 38 38 <gmd:onLine> 39 39 <gmd:CI_OnlineResource> … … 52 52 </gmd:CI_OnlineResource> 53 53 </gmd:onLine> 54 }} 54 }}} 55 55 * Indexing of the mime type (from the type attribute of gmx:MimeFileType) in Lucene by index-fields.xsl 56 56 * Inclusion of the mime type Lucene field as an !AdditionalQueryable in the CSW config. … … 69 69 == Risks == 70 70 71 The update-fixed-info.xsl calls Java objects in src/org/fao/geonet/util/MimeTypeFinder.java to do the mime-util based calculation. This may slow down indexing of records with attached online resources - haven't noticed much of a slow down in the 3 months or so this has been in the BlueNetMEST branch.71 The update-fixed-info.xsl calls Java objects in src/org/fao/geonet/util/MimeTypeFinder.java to do the mime-util based calculation. This may slow down indexing of records with attached online resources but this hasn't been noticed in the 3 months or so that this function has been in the BlueNetMEST branch. (Francois has suggested a framework that when implemented would remove these tasks to a background thread). 72 72 73 73 == Participants == 74 74 75 75 * CSIRO: Gary Carroll and Uwe Rosebrock 76 * Thanks to Steve Richard (AZGS) and Francois for suggesting gmx:MimeFileType and especially to Francois for adding gmx: support as part of the gco:CharacterString substitution proposal. 76 77