Re: Wild card search not working

2015-11-30 Thread Douglas Kunzma
All - My document has multiple occurrences of the word quartz, but using totalTermFrequency summing for all terms appears to be working. Is this correct? If so thanks for your help. I was really stuck. I owe everyone a beer! Doug On Mon, Nov 30, 2015 at 7:42 AM, Allison, Timothy B. wrote: >

RE: Wild card search not working

2015-11-30 Thread Allison, Timothy B.
I'm getting this (with a single document that contains the word 'quartz': Term freq(indexReader.totalTermFreq(term))=0 Term freq(indexReader.getSumTotalTermFreq("Doc"))=1 totalHits = 1 termStatics=0 Is this what you're getting? So...the search is working, but the term counts aren't returning wh

RE: Wild card search not working

2015-11-30 Thread Allison, Timothy B.
If you want to find the matching terms, you have to do something like this: Query rewritten = spanTerm.rewrite(indexReader); Weight w = rewritten.createWeight(isearcher, false); Set terms = new HashSet<>(); w.extractTerms(terms); for (Ter