Re: Apache Lucene 4.x word counting

2014-03-28 Thread Jose Carlos Canova
There is a small problem in your problem formulation and Lucene, Lucene don't count words, you count terms based on an Analyzer that you have defined during a phase called IndexWriting, such analyzer will tokenize (which does not means use the white space between the words) a sequence of strings

Apache Lucene 4.x word counting

2014-03-28 Thread Hollow Quincy
Hello, I would like to use Apache *Lucene 4*.x and count words in the string, for example: "I loved cats, but now I really love dogs" - count "love" word in the String - result should be 2. I would like to count how many times there was: "give up" in the String as well. I spend a lot of time to r