[TYPO3-Solr] Dynamically add fields during page rendering

Stephan Schuler Stephan.Schuler at netlogix.de
Thu Apr 26 18:08:28 CEST 2012


Hi Ingo.


Thank you for your reply.

I've create my own tx_solr_SubstitutePageIndexer. It fetches the $GLOBALS['TSFE']->content for DOM nodes that match a specific xpath ('//*[@data-solr-field-name]'), use this attributes value as field name, the textContent as field value and directly add this key/value pair to my $substitutePageDocument.
But I only add the new content if the $substitutePageDocument already has such a field. This should make sure to only use fields that are preconfigured regularely.


Regards,


Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de


--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-project-solr-bounces at lists.typo3.org [mailto:typo3-project-solr-bounces at lists.typo3.org] Im Auftrag von Ingo Renner
Gesendet: Donnerstag, 26. April 2012 16:36
An: typo3-project-solr at lists.typo3.org
Betreff: Re: [TYPO3-Solr] Dynamically add fields during page rendering

Am 26.04.12 13:29, schrieb Stephan Schuler:

Hi Stephan,

> 2.     The second solution is adding non-visible content to my frontend output.
>
> This could be done by HTML5 data properties, created by my FCEs during regular page rendering.
> I would implement my own tx_solr_SubstitutePageIndexer that searches the content for those data properties and add new fields to the document.

> I would prefer the second one: Adding meta information to my HTML output all the time and implement my own metadata collector.

The second idea also sounds more clean and easier to me. Also the additionalFields thing is not really recommended anymore, instead it would be plugin.tx_solr.index.queue.pages.fields.*


best
Ingo

--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3 - Open Source Enterprise Content Management System http://typo3.org

Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS http://www.typo3-solr.com _______________________________________________
TYPO3-project-solr mailing list
TYPO3-project-solr at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr


More information about the TYPO3-project-solr mailing list