Search code examples
solrtypo3apache-tikatypo3-10.x

Show extracted content from tika in Frontend


I work with TYPO3 10.4.18, solr_file_indexer 2.3.1 and tika 6.0.0.

For Tika I have the solr server as host.

The indexing of the pages, extensions and documents works flawlessly.The search index contains the content of the documents.

Now I want to display the search results for the documents like the page result list. But I can't find a variable which contains the extracted content from tika for the frontend and can be used in the document.html file of solr.

Is there any additional configuration needed here?


Solution

  • With help from @swilking I found the simple answer for my question:

    In the file document.html of the extension solr write something like

    <f:if condition="{document.type} == 'sys_file_metadata'">
                        <div>{s:document.highlightResult(resultSet:resultSet, document:document,
                            fieldName:'content')}</div>
                </f:if>
    

    to get the file content with the highlight feature.