I did profiling of new code and found that below api call is most time
consuming :-
org.apache.lucene.index.PostingsEnum#freq
If i comment out this call and instead use some random integer for testing
purpose, then perf is at least 5x compared to old code.
Is there any thoughts on why term frequenc
As far as your performance problem is concerned, I don't know. Can you
compare the number of documents that need to be evaluated in both cases,
e.g. by running `IndexSearcher#count` on your two queries. If they're
similar, can you run your new query under a profiler to figure out what its
bottlenec