# General solr configuration
plugin.tx_solr.index {
  additionalFields {

  }

  // assigns processing instructions to Solr fields during indexing, Solr field = processing instruction
  fieldProcessingInstructions {
    changed = timestampToIsoDate
    created = timestampToIsoDate
    endtime = timestampToUtcIsoDate
    rootline = pageUidToHierarchy
  }

  queue {

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

      indexingPriority = 0

      indexer {
        frontendDataHelper.scheme = https

        authorization {
          username = bgmweb
          password = webbgm
        }
      }

      allowedPageTypes = 1,7,137

      // only index standard pages
      additionalWhereClause = (doktype in (1,137) 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, c-share

      fields {
        sortSubTitle_textS = subtitle

        category = SOLR_RELATION
        category {
          localField = categories
          foreignLabelField = uid
          enableRecursiveValueResolution = 1
          multiValue = 1
        }

        groups_stringM = SOLR_RELATION
        groups_stringM {
          localField = categories
          multiValue = 1
          additionalWhereClause = parent={$bgm_theme.solr.categories.groupsParent}
        }

        services_stringM < .groups_stringM
        services_stringM {
          additionalWhereClause = parent={$bgm_theme.solr.categories.services}
        }

        solutions_stringM < .services_stringM
        solutions_stringM {
          additionalWhereClause = parent={$bgm_theme.solr.categories.solutions}
        }

        # try to prefer results where searchword is exact match and only word in field
        title_stringS = title
      }
    }
  }
}
