ext-solr icon indicating copy to clipboard operation
ext-solr copied to clipboard

[BUG] Indexing priority is not applied when adding a new record

Open maryahcm opened this issue 10 months ago • 0 comments

Describe the bug When adding a new record (it could be page or any other custom type), the indexing_priority field is not taken into account. However, if the record is reprocessed through the backend indexing queue Module, the indexing_priority is correctly applied.

To Reproduce

  1. Go to the TYPO3 backend
  2. Add a new record (make sure to define the plugin.tx_solr.index.queue."solrConfiguration".indexingPriority = 20
  3. Check the tx_solr_indexqueue_item table and notice that indexing_priority is not set.
  4. Manually reprocess the record through the backend indexing queue module.
  5. Check the tx_solr_indexqueue_item table again; indexing_priority is now correctly set.

Expected behavior The indexing_priority should be correctly set when a new record is added, without requiring manual reprocessing via the backend.

Used versions (please complete the following information):

  • TYPO3 Version: 12.4.27
  • EXT:solr Version: 12.0.5 (same code in 12.0.6)
  • PHP Version: 8.2.12
  • MySQL Version: 8.0.39

Additional context The issue occurs because the method ApacheSolrForTypo3\Solr\Domain\Index\Queue\QueueItemRepository::add() does not set the indexing_priority value when inserting a new record. However, QueueItemRepository::updateExistingItemByItemTypeAndItemUidAndRootPageId() does set the indexing_priority when an item is reprocessed via the backend indexing queue.

maryahcm avatar Feb 27 '25 16:02 maryahcm