Github user alessandrobenedetti commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/482#discussion_r227461971 --- Diff: lucene/core/src/test/org/apache/lucene/analysis/TestStopFilter.java --- @@ -47,58 +48,65 @@ public void testStopFilt() throws IOException { assertTokenStreamContents(stream, new String[] { "Now", "The" }); } + + private void logStopwords(String name, List<String> stopwords){ + // helper method: converts a list + log(String.format("stopword list \"%s:\"", name)); + for (int i = 0; i < stopwords.size(); i++) { + log(String.format("stopword (%d): %s ", i, stopwords.get(i))); + } + log("----------"); + } /** * Test Position increments applied by StopFilter with and without enabling this option. */ - public void testStopPositons() throws IOException { + public void testStopPositions() throws IOException { + final int NUMBER_OF_TOKENS = 20; StringBuilder sb = new StringBuilder(); - ArrayList<String> a = new ArrayList<>(); - for (int i=0; i<20; i++) { - String w = English.intToEnglish(i).trim(); - sb.append(w).append(" "); - if (i%3 != 0) a.add(w); + List<String> stopwords = new ArrayList<>(NUMBER_OF_TOKENS); --- End diff -- Maybe renaming sb -> inputText ?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org