@Override
    public void addConfigurationParameter(String key, String value) {

        switch (key) {
            case POST_PROCESSOR:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    try {
                        setPostProcessor((I_CmsSolrPostSearchProcessor)Class.forName(value).newInstance());
                    } catch (Exception e) {
                        CmsException ex = new CmsException(
                            Messages.get().container(Messages.LOG_SOLR_ERR_POST_PROCESSOR_NOT_EXIST_1, value),
                            e);
                        LOG.error(ex.getMessage(), ex);
                    }
                }
                break;
            case SOLR_HANDLER_ALLOWED_FIELDS:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    m_handlerAllowedFields = Stream.of(value.split(",")).map(v -> v.trim()).toArray(String[]::new);
                }
                break;
            case SOLR_HANDLER_MAX_ALLOWED_RESULTS_PER_PAGE:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    try {
                        m_handlerMaxAllowedResultsPerPage = Integer.parseInt(value);
                    } catch (NumberFormatException e) {
                        LOG.warn(
                            "Could not parse parameter \""
                                + SOLR_HANDLER_MAX_ALLOWED_RESULTS_PER_PAGE
                                + "\" for index \""
                                + getName()
                                + "\". Results per page will not be restricted.");
                    }
                }
                break;
            case SOLR_HANDLER_MAX_ALLOWED_RESULTS_AT_ALL:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    try {
                        m_handlerMaxAllowedResultsAtAll = Integer.parseInt(value);
                    } catch (NumberFormatException e) {
                        LOG.warn(
                            "Could not parse parameter \""
                                + SOLR_HANDLER_MAX_ALLOWED_RESULTS_AT_ALL
                                + "\" for index \""
                                + getName()
                                + "\". Results per page will not be restricted.");
                    }
                }
                break;
            case SOLR_HANDLER_DISABLE_SELECT:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    m_handlerSelectDisabled = value.trim().toLowerCase().equals("true");
                }
                break;
            case SOLR_HANDLER_DEBUG_SECRET_FILE:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    m_handlerDebugSecretFile = value.trim();
                }
                break;
            case SOLR_HANDLER_DISABLE_SPELL:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    m_handlerSpellDisabled = value.trim().toLowerCase().equals("true");
                }
                break;
            case SOLR_SEARCH_MAX_PROCESSED_RESULTS:
                if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                    try {
                        m_maxProcessedResults = Integer.parseInt(value);
                    } catch (NumberFormatException e) {
                        LOG.warn(
                            "Could not parse parameter \""
                                + SOLR_SEARCH_MAX_PROCESSED_RESULTS
                                + "\" for index \""
                                + getName()
                                + "\". The global configuration will be used instead.");
                    }
                }
                break;
            default:
                super.addConfigurationParameter(key, value);
                break;
        }
    }
@ Override public void addConfigurationParameter ( String key , String value ) { switch ( key ) { case POST_PROCESSOR : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { try { setPostProcessor ( ( I_CmsSolrPostSearchProcessor ) Class . forName ( value ) . newInstance ( ) ) ; } catch ( Exception e ) { CmsException ex = new CmsException ( Messages . get ( ) . container ( Messages . LOG_SOLR_ERR_POST_PROCESSOR_NOT_EXIST_1 , value ) , e ) ; LOG . error ( ex . getMessage ( ) , ex ) ; } } break ; case SOLR_HANDLER_ALLOWED_FIELDS : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { m_handlerAllowedFields = Stream . of ( value . split ( "," ) ) . map ( v -> v . trim ( ) ) . toArray ( String [ ] :: new ) ; } break ; case SOLR_HANDLER_MAX_ALLOWED_RESULTS_PER_PAGE : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { try { m_handlerMaxAllowedResultsPerPage = Integer . parseInt ( value ) ; } catch ( NumberFormatException e ) { LOG . warn ( "Could not parse parameter \"" + SOLR_HANDLER_MAX_ALLOWED_RESULTS_PER_PAGE + "\" for index \"" + getName ( ) + "\". Results per page will not be restricted." ) ; } } break ; case SOLR_HANDLER_MAX_ALLOWED_RESULTS_AT_ALL : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { try { m_handlerMaxAllowedResultsAtAll = Integer . parseInt ( value ) ; } catch ( NumberFormatException e ) { LOG . warn ( "Could not parse parameter \"" + SOLR_HANDLER_MAX_ALLOWED_RESULTS_AT_ALL + "\" for index \"" + getName ( ) + "\". Results per page will not be restricted." ) ; } } break ; case SOLR_HANDLER_DISABLE_SELECT : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { m_handlerSelectDisabled = value . trim ( ) . toLowerCase ( ) . equals ( "true" ) ; } break ; case SOLR_HANDLER_DEBUG_SECRET_FILE : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { m_handlerDebugSecretFile = value . trim ( ) ; } break ; case SOLR_HANDLER_DISABLE_SPELL : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { m_handlerSpellDisabled = value . trim ( ) . toLowerCase ( ) . equals ( "true" ) ; } break ; case SOLR_SEARCH_MAX_PROCESSED_RESULTS : if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { try { m_maxProcessedResults = Integer . parseInt ( value ) ; } catch ( NumberFormatException e ) { LOG . warn ( "Could not parse parameter \"" + SOLR_SEARCH_MAX_PROCESSED_RESULTS + "\" for index \"" + getName ( ) + "\". The global configuration will be used instead." ) ; } } break ; default : super . addConfigurationParameter ( key , value ) ; break ; } }
@see org.opencms.search.CmsSearchIndex#addConfigurationParameter(java.lang.String, java.lang.String)