lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Ronge <mro...@theronge.com>
Subject Faceting with payloads
Date Wed, 06 Feb 2008 22:10:56 GMT
Hi all,

I'm using the new payloads feature to assign types to tokens as I  
index. The type is based on the surrounding text in the document, and  
I want to filter my searches based on this token type.

For example, 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.

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.

Thanks in advance,
--
Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message