Hallo,

ich muss nach "benutzerdefinierten" Seitentypen filtern, die ich im 
plugin.tx_solr.queue provisorisch definiert habe:

queue {

                        // mapping tableName.fields.SolrFieldName => 
TableFieldName (+ cObj processing)

                        pages = 1
                        pages {
                                initialization = 
ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page

                                // allowed page types (doktype) when indexing records 
from table "pages"
                                allowedPageTypes = 1, 4, 100, 101, 102, 103, 
104, 105, 106, 107, 108, 110, 111, 112, 113, 114

                                indexingPriority = 0
                                no_search = 0
                                indexer = 
ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
                                indexer {
                                        // add options for the indexer here
                                }

                                // Only index standard pages and mount points 
that are not overlayed.
                                // additionalWhereClause = (doktype = 1 OR 
doktype=4 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0

                                //exclude some html parts inside TYPO3SEARCH 
markers by classname (comma list)
                                excludeContentByClass = typo3-search-exclude

                                fields {
                                        sortSubTitle_stringS = subtitle
                                        category_stringM = SOLR_RELATION
                                        category_stringM {
                                                localField = categories
                                                foreignLabelField = uid
                                                multiValue = 1
                                        }
                                        doktype_stringS = doktype

                                }
                        }

                        news = 1
                        news {
                                table = tx_news_domain_model_news

                                fields {
                                        abstract = teaser
                                        author = author
                                        authorEmail_stringS = author_email
                                        title = title

                                        content = SOLR_CONTENT
                                        content {
                                                cObject = COA
                                                cObject {
                                                        10 = TEXT
                                                        10 {
                                                                field = bodytext
                                                                noTrimWrap = || 
|
                                                        }
                                                }
                                        }

                                        keywords = SOLR_MULTIVALUE
                                        keywords {
                                                field = keywords
                                        }

                                        tags_stringM = SOLR_RELATION
                                        tags_stringM {
                                                localField = tags
                                                multiValue = 1
                                        }

                                        url = TEXT
                                        url {
                                                        typolink.parameter = 134
                                                        typolink.additionalParams = 
&tx_news_pi1[controller]=News&
                                                        tx_news_pi1[action]= 
detail&tx_news_pi1[news]={field:uid}
                                                        
typolink.additionalParams.insertData = 1
                                                        typolink.useCacheHash = 
1
                                                        typolink.returnLast = 
url
                                                }
                                        }

                                                attachments {
                                                        fields = related_files
                                                }
                        }

                        themenseiten = 1
                        themenseiten {
                                table = pages
                                additionalWhereClause = doktype IN(100, 101, 
106, 107, 108)
                                fields {
                                        abstract = teaser
                                        author = author
                                        authorEmail_stringS = author_email
                                        title = title

                                }
                        }

                        
                        aktuelles = 1
                        aktuelles {
                                table = pages
                                allowedPageTypes = 105
                                additionalWhereClause =
                        }
}

in plugin.tx_solr.search habe ich die "facetten" aufgelistet:

faceting = 1
                faceting {
                        minimumCount = 1
                        sortBy = count
                        limit = 10
                        singleFacetMode = 1
                        showEmptyFacets = 1
                        keepAllFacetsOnSelection = 1

                        facetLinkATagParams = rel="nofollow"

                        facetLinkUrlParameters =

                        facets {

                                type {

                                        label = Inhaltstyp

                                        renderingInstruction = CASE
                                        renderingInstruction {

                                        key.field = optionValue

                                        pages = TEXT
                                        pages.value = Pages
                                        pages.lang.de = Seiten


                                        news = TEXT
                                        news.value = News
                                        news.lang.de = Nachrichten



                                        themenseiten = TEXT
                                        themenseiten.value = Themes
                                        themenseiten.lang.de = Themenseiten



                                        aktuelles = TEXT
                                        aktuelles .value = Up to Date
                                        aktuelles .lang.de = Aktuelles
                                        }

                                }

Nun habe ich einen Fehler auf dem Server
org.apache.solr.common.SolrException: undefined field: ""
        at org.apache.solr.schema.IndexSchema.getField(IndexSchema.java:1177)

weil natürlich das Feld aus dem Schema nach dem wir filtern, fehlt. Nur ich habe ganz viele Beispiele im Internet gesehen, wo eben das Feld nicht benötigt wird , weil wir die "Seitentypen" eben selbst definieren und die sind im Schema nicht festgelegt.

Hat jemand denselben Fehler gehabt? Oder habe ich etwas vergessen?

Vielen Dank und viele Grüße
Alla

_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an