lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Olson <>
Subject Query term counting, again...
Date Wed, 25 Jan 2012 23:36:19 GMT
Hi all,

After much code and forum searching, I've hit a frustrating point that
should be more obvious. I've trolled through a ton of postings and messaging
on keyword counting and it seems like all the examples cover single word
terms. I've got several code bits I've written that can get me what I want
from a single term perspective but I have queries with several terms that
also mix in phrases. Ultimately I'd like to have output that says banana - 2
times, "chocolate chips" - 4 times, over a course of 1000+ documents.

Right now I walk through the query terms and match against the term vectors
from my hits. This, of course, makes the assumption chocolate and chips are
separate terms. Comparing positions seems like the only way.

The frustrating point is that I see the 2 query types in the clauses for the
query. And, more annoying is that explain() does show what I need and I
haven't had a lot of luck backtracking what it's doing. Spans didn't seem to
help either.

Any advice? I'm getting real good a single term counting :)


View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message