dependency-check-core/src/main/java/org/owasp/dependencycheck/data/lucene/SearchFieldAnalyzer.java
/**
     * Creates a the TokenStreamComponents used to analyze the stream.
     *
     * @param fieldName the field that this lucene analyzer will process
     * @param reader a reader containing the tokens
     * @return the token stream filter chain
     */
Creates a the TokenStreamComponents used to analyze the stream.
@param fieldName the field that this lucene analyzer will process
@param reader a reader containing the tokens
@return the token stream filter chain
Creates a the TokenStreamComponents used to analyze the stream . @param fieldName the field that this lucene analyzer will process @param reader a reader containing the tokens @return the token stream filter chain
@Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
        final Tokenizer source = new AlphaNumericTokenizer(version, reader);
        TokenStream stream = source;
        stream = new WordDelimiterFilter(stream,
                WordDelimiterFilter.GENERATE_WORD_PARTS
                | WordDelimiterFilter.GENERATE_NUMBER_PARTS
                | WordDelimiterFilter.PRESERVE_ORIGINAL
                | WordDelimiterFilter.SPLIT_ON_CASE_CHANGE
                | WordDelimiterFilter.SPLIT_ON_NUMERICS
                | WordDelimiterFilter.STEM_ENGLISH_POSSESSIVE, null);
        stream = new LowerCaseFilter(version, stream);
        stream = new UrlTokenizingFilter(stream);
        stream = new StopFilter(version, stream, stopWords);
        stream = new TokenPairConcatenatingFilter(stream);
        return new TokenStreamComponents(source, stream);
    }
@ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { final Tokenizer source = new AlphaNumericTokenizer ( version , reader ) ; TokenStream stream = source ; stream = new WordDelimiterFilter ( stream , WordDelimiterFilter . GENERATE_WORD_PARTS | WordDelimiterFilter . GENERATE_NUMBER_PARTS | WordDelimiterFilter . PRESERVE_ORIGINAL | WordDelimiterFilter . SPLIT_ON_CASE_CHANGE | WordDelimiterFilter . SPLIT_ON_NUMERICS | WordDelimiterFilter . STEM_ENGLISH_POSSESSIVE , null ) ; stream = new LowerCaseFilter ( version , stream ) ; stream = new UrlTokenizingFilter ( stream ) ; stream = new StopFilter ( version , stream , stopWords ) ; stream = new TokenPairConcatenatingFilter ( stream ) ; return new TokenStreamComponents ( source , stream ) ; }
Creates a the TokenStreamComponents used to analyze the stream.
Creates a the TokenStreamComponents used to analyze the stream .