ext-solr
ext-solr copied to clipboard
[DOC] Table can get indexed only once
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
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:
- Update the documentation for a better description of queueindexingConfigurationtable
- Allow to configure the type
@dkd-kaehm @dkd-friedrich Any suggestions or ideas?
Please in FAQ or as first "Dos and Don'ts"