简体   繁体   中英

TYPO3 Solr extension and facets

I have a small question about TYPO3 solr facets.At present in my website I have 6 different indexing configuration available. Two of them are custom extension table's and one is tt_news and rest of the 3 are pages table with some custom condition. I managed to add this using additionalWhereClause . My requirement is add facets in front-end . I have manged to do this also . See below for the Typoscript

facets { 
    type {
        field = type
        renderingInstruction = CASE
        renderingInstruction {
            key.field = optionValue

            pages = TEXT
            pages.value = Search Units     

            search_units = TEXT
            search_units..value = Search Units   ( This is also pages but I can see this facets in frontend)  

            expertise_offered = TEXT
            expertise_offered.value = EXpertise 

            tt_news = TEXT
            tt_news.value = News

            user_xxxxxxxxxxx_event = TEXT
            user_xxxxxxxxxxx_event.value = XXXX Events

            user_xxxxxxxxxxxxx_officer = TEXT
            user_xxxxxxxxxxxxx_officer.value = XXXXX Officers 

        }   
    }  

In front end I can see only 4 facets , the 3 pages indexes are grouped into one. So my question is , Is it possible that we can separate these configuration and show them as independent facets in front-end ? ie the above configuration should return 6 facets in fornt-end .

Any help would be appreciated.

I assume that your type -field in the solr index only has 4 values, one for pages, 1 each for the two custom tables, and 1 for news. In order to get 6 facets, you need to have 6 different values in the field the faceting is done on.

I'm not sure if you can define the value of the type -field for each indexing configuration (doesn't look that way when looking into the documentation ).

Anyway, there is another way: Add another (dynamic) field to the documents, on which you can do the facetting:

  1. Add a new field in the fields part of each indexing configuration, using SOLR-type *_stringS (see Wiki of the extension for dynamic fields ). That type does not do text analysis, so it should be usable for faceting.
  2. Change the field you do the faceting on to the new field.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM