lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars-Erik Aabech <>
Subject Possible to "quickly" fetch count of other terms based on a query
Date Fri, 22 Feb 2013 09:14:18 GMT

I'm sorry I didn't do any hard research on this, it's so quick to ask. ;)

Is it possible to somehow find the count of each term in a set for each document returned
by a query?

For instance, if I use the query +(foo:bar foo:morebar) +(bar:foo),
Could I without fetching all the documents from this query, find the count of occurances of
the terms [barette, fooish, bar, morebar, foo]?
The result I'm after is something like
barette: 10,
fooish: 0,
bar: 5,
morebar: 8
foo: 3

Hope the question is clear enough.
Any suggestion is welcome.
I'd prefer not having to build a second index, though..

(I guess I could do a new "combined" query for each term in the set, but if any other way
it'd be nice)

Lars-Erik Aabech
Faglig leder utvikling
MarkedsPartner AS
Mobil: +47 920 30 537

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message