lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffery Yuan <yuanyun...@gmail.com>
Subject Facet+Stats+MinCount: How to use mincount filter when use facet+stats
Date Mon, 03 Oct 2016 22:14:48 GMT
We store some events data such as *accountId, startTime, endTime, timeSpent*
and some other searchable fields.We want to get all acountIds that spend
more than xhours between startTime and endTime and some other criteria which
are not important here.We can use facet and stats query like
below:*stats=true&stats.field={!tag=timeSpent
sum=true}timeSpent&facet=true&facet.pivot={!stats=timeSpent}accountId*This
will return how many hours all acountIds spends between startTime and
endTime, then I can do filter in our code.But this will return a lot of
acountIds which are not wanted. I am wondering whether Solr can do the
filter for us and only return accountIds that spends more than x hours?Is it
possible that I use facet function to get sum, and then use mincount to do
filter? http://yonik.com/solr-facet-functions/
<http://yonik.com/solr-facet-functions/>  



--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-Stats-MinCount-How-to-use-mincount-filter-when-use-facet-stats-tp4299367.html
Sent from the Solr - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message