public Analyzer getAnalyzer(Analyzer analyzer) {

        // parent folder and last modified lookup fields must use whitespace analyzer
        WhitespaceAnalyzer ws = new WhitespaceAnalyzer();
        Map<String, Analyzer> analyzers = new HashMap<String, Analyzer>();
        // first make map the default hard coded fields
        analyzers.put(CmsSearchField.FIELD_PARENT_FOLDERS, ws);
        analyzers.put(CmsSearchField.FIELD_CATEGORY, ws);
        analyzers.put(CmsSearchField.FIELD_DATE_LASTMODIFIED_LOOKUP, ws);
        analyzers.put(CmsSearchField.FIELD_DATE_CREATED_LOOKUP, ws);

        for (CmsLuceneField field : getLuceneFields()) {
            Analyzer fieldAnalyzer = field.getAnalyzer();
            if (fieldAnalyzer != null) {
                // this field has an individual analyzer configured
                analyzers.put(field.getName(), fieldAnalyzer);
            }
        }
        // return the individual field configured analyzer
        return new PerFieldAnalyzerWrapper(analyzer, analyzers);
    }
public Analyzer getAnalyzer ( Analyzer analyzer ) { WhitespaceAnalyzer ws = new WhitespaceAnalyzer ( ) ; Map < String , Analyzer > analyzers = new HashMap < String , Analyzer > ( ) ; analyzers . put ( CmsSearchField . FIELD_PARENT_FOLDERS , ws ) ; analyzers . put ( CmsSearchField . FIELD_CATEGORY , ws ) ; analyzers . put ( CmsSearchField . FIELD_DATE_LASTMODIFIED_LOOKUP , ws ) ; analyzers . put ( CmsSearchField . FIELD_DATE_CREATED_LOOKUP , ws ) ; for ( CmsLuceneField field : getLuceneFields ( ) ) { Analyzer fieldAnalyzer = field . getAnalyzer ( ) ; if ( fieldAnalyzer != null ) { analyzers . put ( field . getName ( ) , fieldAnalyzer ) ; } } return new PerFieldAnalyzerWrapper ( analyzer , analyzers ) ; }
Returns an analyzer that wraps the given base analyzer with the analyzers of this individual field configuration.<p>

@param analyzer the base analyzer to wrap

@return an analyzer that wraps the given base analyzer with the analyzers of this individual field configuration