Re: Best way to anchor solr searches?

2011-09-03 Thread Jan Høydahl
If I understand correctly, you SORT on login_time desc.
Perhaps your biggest problem is that for each user logging in, they jump to 
page 1, so this issue is very visible.
A simple way to fix this is to add a filter when you page, e.g. 
fq=login_time:[* TO time-of-first-page-query], effectively freezing the time 
window you're viewing. Of course, if a user which is on page 2 when you're 
watching page 1, he will then fall out of your radar when you go to page 2. 
However, it's probably not likely that a user who just recently logged in will 
log in again very soon…

Freezing the index is harder. Lucene has something called commit-point which - 
if kept constant for all queries will give you the same index version. But Solr 
does not expose this as a feature, so you'd have to roll your own caching 
someway. Perhaps increasing queryResultWindowSize will help.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 25. aug. 2011, at 02:01, arian487 wrote:

 If I'm searching for users based on last login time, and I search once, then
 go to the second page with a new offset, I could potentially see the same
 users on page 2 if the index has changed.  What is the best way to anchor it
 so I avoid this?  
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3282576.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Best way to anchor solr searches?

2011-08-25 Thread lee carroll
I don't think solr conforms to ACID type behaviours for its queries.
This is not to say your use-case is not important
just that its not SOLR's focus. I think its a interesting question but
the solution is probably going to involve rolling your own.

Something like returning 1 user docs and caching these in an
application cache. pagination occurs in this cache rather than as a
solr query with the start param incremented. Maybe offer a refresh
data link with repopulates the cache from solr.

cheers lee c

On 25 August 2011 01:01, arian487 akarb...@tagged.com wrote:
 If I'm searching for users based on last login time, and I search once, then
 go to the second page with a new offset, I could potentially see the same
 users on page 2 if the index has changed.  What is the best way to anchor it
 so I avoid this?

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3282576.html
 Sent from the Solr - User mailing list archive at Nabble.com.



RE: Best way to anchor solr searches?

2011-08-25 Thread Jaeger, Jay - DOT
I don't think it has to be quite so bleak as that, depending upon the number of 
queries done over a given timeframe, and the size of the result sets.  Solr 
does cache the identifiers of documents returned by search results.   See 
http://wiki.apache.org/solr/SolrCaching paying particular attention to 
queryResultCache and queryResultWindoeSize .
 
Not a guarantee, of course, but if the number of people searching is limited, 
and the result set sizes is manageable, the cache can probably accommodate 
their business need.

JRJ

-Original Message-
From: lee carroll [mailto:lee.a.carr...@googlemail.com] 
Sent: Thursday, August 25, 2011 6:33 AM
To: solr-user@lucene.apache.org
Subject: Re: Best way to anchor solr searches?

I don't think solr conforms to ACID type behaviours for its queries.
This is not to say your use-case is not important
just that its not SOLR's focus. I think its a interesting question but
the solution is probably going to involve rolling your own.

Something like returning 1 user docs and caching these in an
application cache. pagination occurs in this cache rather than as a
solr query with the start param incremented. Maybe offer a refresh
data link with repopulates the cache from solr.

cheers lee c

On 25 August 2011 01:01, arian487 akarb...@tagged.com wrote:
 If I'm searching for users based on last login time, and I search once, then
 go to the second page with a new offset, I could potentially see the same
 users on page 2 if the index has changed.  What is the best way to anchor it
 so I avoid this?

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3282576.html
 Sent from the Solr - User mailing list archive at Nabble.com.



RE: Best way to anchor solr searches?

2011-08-25 Thread arian487
Thanks for the replies.  I did look at caching but our commit time time is 90
seconds.  It's definitely possible for someone to make a search, change the
page, and have wonky results.  How about getting it to autowarm the x most
recent searches in the queryResultCache and that can hopefully reduce the
issues?  Though even that can result in issues with the search being out of
date.  

Application cache per user would for sure solve such issues but I'd like to
avoid this if possible.  Definitely an interesting problem...

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3284674.html
Sent from the Solr - User mailing list archive at Nabble.com.


Best way to anchor solr searches?

2011-08-24 Thread arian487
If I'm searching for users based on last login time, and I search once, then
go to the second page with a new offset, I could potentially see the same
users on page 2 if the index has changed.  What is the best way to anchor it
so I avoid this?  

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3282576.html
Sent from the Solr - User mailing list archive at Nabble.com.