You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mike Ree <mi...@olytech.net> on 2013/05/30 19:26:18 UTC

Find rows within range of other rows

I need to do a query where I need to find all people who have done 2 events
within a range. I currently log one row per an event.

Example:
Person,Date,ViewedUrl
1,2012May10,google.com
2,2012May10,yahoo.com
1,2012May13,yahoo.com
2,2012May13,google.com

Sample request would be wanting to find all people who viewed
yahoo.comwithin a week of viewing
google.com, so I would want to return 1 group of values for person 1.

Any idea's?

Thanks,
Mike

Re: Find rows within range of other rows

Posted by bbarani <bb...@gmail.com>.
Looks like what you need is pivoted facets...Range within range 

http://wiki.apache.org/solr/SimpleFacetParameters#Pivot_.28ie_Decision_Tree.29_Faceting

Pivot faceting allows you to facet within the results of the parent facet

Category1 (17)
item 1 (9)
item 2 (8)
Category2 (6)
item 3 (6)
Category3 (23)
item 4 (23)

If you are using old version of SOLR, you can follow these steps..

http://loose-bits.com/2011/09/20/pivot-facets-solr.html




--
View this message in context: http://lucene.472066.n3.nabble.com/Find-rows-within-range-of-other-rows-tp4067115p4067428.html
Sent from the Solr - User mailing list archive at Nabble.com.