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

[DOC] Table can get indexed only once

Open dkd-friedrich opened this issue 8 years ago • 2 comments

Bernhard Kraft wrote:

The solr wiki states, that the records of a table could get indexed multiple times using different configuration [1].

But this is not working properly. First of all the "id" field is generated from: the site hash, tablename and uid [2].

As this field will be unique this circumstance alone already prohibits indexing the same record with different configurations (and fields).

Next the "type" field will ususally get set to the table which is being indexed. The "indexingConfiguration" parameter is never transfered to the solr document. This can get worked around by setting the following TypoScript for example:


plugin.tx_solr.index.queue {

       tx_agespge_mitarbeiter = 1
       tx_agespge_mitarbeiter {
               table = tx_agespge_mitarbeiter
<                # [...]

       }

       telefonbuch < .tx_agespge_mitarbeiter
       telefonbuch {

               fields {  
                       # [...]

                       type = TEXT
                       type.value = telefonbuch

                       # [...]
               }
       }
}

So setting the "type" field manually from within fields works. How is this intended to work? Should a "extraType" field manually get added and used for facettes?

[1] https://forge.typo3.org/projects/extension-solr/wiki/Tx_solrindex#queueindexingConfigurationtable [2] https://git.typo3.org/TYPO3CMS/Extensions/solr.git/blob/refs/heads/solr_3.0.x:/Classes/Util.php#l98


https://forge.typo3.org/issues/67356 https://review.typo3.org/#/c/40108/

Since the indexing configuration isn't considered within the calculated document id, documents get overwritten if the same record is indexed several times

Effort: 3 Value: 8

dkd-friedrich avatar Jul 15 '16 12:07 dkd-friedrich

Currently it is not possible to index one table as two different types. The type could not change with TypoScript and the ID of an document based on the Site hash, type and database uid.

At the moment we could not identify a use case, what could not be done by adding additional fields to the same document.

Since the introduction of Fluid to Solr it is more easier to handle a document different depending on document values.

This specific issue could be solved in two different ways:

  1. Update the documentation for a better description of queueindexingConfigurationtable
  2. Allow to configure the type

@dkd-kaehm @dkd-friedrich Any suggestions or ideas?

3l73 avatar Mar 05 '21 10:03 3l73

Please in FAQ or as first "Dos and Don'ts"

dkd-kaehm avatar Dec 07 '21 21:12 dkd-kaehm