Info |
---|
Valid for 4.0The documentation below is valid from Datafari 4.0 upwards |
When indexing documents, Datafari tries to identify the types of files it is indexing to register the correct extension together with each document. The registered extension is used to provide faceted search and allow allows the user to filter the results of his query by file type. This page exposes the means used by Datafari to perform this detection.
Default Behavior
By default, Datafari will try to guess the extension of the file from the filename. If the URL to a document si is something like:
Code Block | ||
---|---|---|
| ||
file:///a/b/c/someFile.ext |
...
Warning | ||
---|---|---|
Be aware that using the default behavior on websites that have url like:
will result in a php type for this document (and all other documents that are retrieved using the same script). For web crawl in general, it is advised to use the alternative configuration, that uses the Tika extracted type in priority. |
Alternative Configuration
The configuration can be change by changing changed in the solrconfig.xml file via the following parameter:
Code Block |
---|
<str name="extension.fromname">true</str> |
Changing Setting the value of this parameter to false, the tika type guessing system will be used as the main source of information for file types, and the filename will be used as a fallback if the tika information fails.
This parameter is under the the "datafari" updateRequestProcessorChain (near line 1180, but this may obviously change).
Please refer to Manage Solr configuration with Zookeeper System Configuration Manager (Zookeeper) to know where the configuration files are located and how to reload the configuration correctly.
...