hmmh / typo3-solr-file-indexer

TYPO3 Extension: solr_file_indexer
GNU General Public License v3.0
11 stars 7 forks source link

Error occured while initializing #55

Closed honsa closed 5 months ago

honsa commented 5 months ago

We receive a Javascript error and are not able to add the sys_file_metadata to the queue, with TYPO3 12.4.15 and typo3-solr-file-indexer 3.0.0

Error occured while initializing An error occurred while initializing the index queue: sys_file_metadata [1662117020]

image

You can reproduce it in a fresh Installation of TYPO3 12.4.15 using the following packages:

"typo3/cms-scheduler": "12.4.15",
"apache-solr-for-typo3/solr": "12.0.3",
"apache-solr-for-typo3/tika": "12.0.2",
"hmmh/solr-file-indexer": "3.0.0"

And your plugin.tx_solr config example:

plugin.tx_solr {
  index {
    queue {
      sys_file_metadata = 1
      sys_file_metadata {
        initialization = HMMH\SolrFileIndexer\IndexQueue\FileInitializer
        indexer = HMMH\SolrFileIndexer\Indexer\FileIndexer
        allowedFileTypes = pdf,doc,docx,xlsx

        fields {
          title = title
          created = crdate
          changed = tstamp

          size_intS = SOLR_RELATION
          size_intS {
            localField = file
            foreignLabelField = size
          }

          fileExtension = SOLR_RELATION
          fileExtension {
            localField = file
            foreignLabelField = extension
          }

          title_stringS = SOLR_RELATION
          title_stringS {
            localField = file
            foreignLabelField = name
          }

          description = description
          keywords = keywords
          author = creator
        }
      }
    }
  }
}
swilking commented 5 months ago

Have you create a file collection with searchable documents and created a scheduler task?

See https://github.com/hmmh/typo3-solr-file-indexer?tab=readme-ov-file#adding-a-document-to-the-search-index

The task must have run once before the index queue can be filled with documents.

honsa commented 5 months ago

A File Collection exists and is marked as use_for_solr

Which Scheduler Task do you mean? There are no scheduler tasks from this extension

image

swilking commented 5 months ago

It's described here: https://github.com/hmmh/typo3-solr-file-indexer?tab=readme-ov-file#adding-a-document-to-the-search-index

You have to set the scheduler task (Execute console commands) "solr_file_indexer:item-queue-worker". The "Execute console commands" are located in the group "scheduler". In this command you will find the task "solr_file_indexer:item-queue-worker"

honsa commented 5 months ago

Ah that is the idea, why not a separate task?

But anyway, thank you for your help