[TYPO3-Solr] Extension is not indexed
Jigal van Hemert
jigal.van.hemert at typo3.org
Fri Jun 28 22:01:08 CEST 2013
Hi,
On 27-6-2013 15:08, Hans-Peter M. wrote:
> Thanks for the reply.
> This is hard stuff.
> i have no experience with solr.
We all started with zero experience :-)
The wiki [1] has all the information about configuration of Solr.
The configuration of index.queue is like this ( descriptions between <>):
<queue name> = 1 # 1 to enable it, 0 to disable it
<queue name> {
table = <table name> # not needed if <queue name> is the table name
fields {
<solr field> = <table column>
<solr field> = <TypoScript object>
<solr field> = <Solr extra TypoScript object>
The simple case is that you use a solr field name and a table column. If
you need extra processing you can use any TypoScript object:
url = TEXT
url {
typolink {
parameter = 123 # the single view page
additionalParams = &tx_extname_pi1[showUid]={field:uid}
additionalParams.insertData = 1
returnLast = url # only return URL instead of complete link
useCacheHash = 1
}
}
Solr supplies a few extra TypoScript objects [2]:
- SOLR_CONTENT : basically like TEXT, but all HTML, JavaScript and
invalid UTF-8 characters are removed. Great for the field that is
displayed as the snippet!
- SOLR_MULTIVALUE : put a comma (or other delimiter) separated value in
it and it will be used as an array of value. Great for storing
categories, keywords, tags, etc.
- SOLR_RELATION : real magic! Give it the field that is defined in TCA
as a relation with another table and it resolves that relationship by
looking at the TCA configuration. Even supports mm-tables.
Besides the usual solr fields as in the examples you've seen you can
also add your own fields; see the section on Dynamic Fields [3].
Example for ir_faq:
index {
queue {
faq = 1
faq {
table = tx_irfaq_q
fields {
abstract = q
changed = tstamp
content = SOLR_CONTENT
content {
field = a
}
created = crdate
description = q
title = q
url = TEXT
url {
typolink {
parameter = 123 # Single view page
additionalParams =
&tx_irfaq_pi1[showUid]={field:uid}&tx_irfaq_pi1[pid]=888
additionalParams.insertData = 1
returnLast = url
useCacheHash = 1
}
[... all the closing brackets left out ...]
[1] http://forge.typo3.org/projects/extension-solr/wiki/Tx_solrindex
[2]
http://forge.typo3.org/projects/extension-solr/wiki/Tx_solrindex#Indexing-Helpers
[3] http://forge.typo3.org/projects/extension-solr/wiki/Dynamic_Fields
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-project-solr
mailing list