lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <>
Subject Re: Faceting with payloads
Date Fri, 08 Feb 2008 17:17:14 GMT

6 feb 2008 kl. 23.10 skrev Matt Ronge:

> I may index the token "house" maybe found in different places with  
> different types. If the user query contains house, I want to report  
> the number of instances of the token house of type A, type B and so  
> on.
> Should I be using payloads for this? If so, I'd like to be able to  
> count up all the instances of for each type. Then I can show the  
> results, along with TypeA (100 hits), TypeB (1000 hits) so on.

Pehaps, what do you do with these numbers you extract?

> If I could use something like HitCollector that was passed in the  
> token payload, that would be perfect, but it doesn't support that.  
> Any thoughts on how to go about this? Also, if I want to only allow  
> tokens of TypeB, how can I efficiently filter by TypeB; using a  
> Similarity subclass seems like a hack.

I think you will have to hack the Query classes you want to use, and  
make their Weight share some counter thingy you can inspect after  
invoking a Query in the Searcher. But I'm not sure.


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

View raw message