Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72A8C10D7B for ; Thu, 29 May 2014 15:30:11 +0000 (UTC) Received: (qmail 52292 invoked by uid 500); 29 May 2014 15:30:04 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 52227 invoked by uid 500); 29 May 2014 15:30:04 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 52220 invoked by uid 99); 29 May 2014 15:30:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 15:30:04 +0000 Date: Thu, 29 May 2014 15:30:04 +0000 (UTC) From: "Alexander S. (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-5463) Provide cursor/token based "searchAfter" support that works with arbitrary sorting (ie: "deep paging") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012449#comment-14012449 ] Alexander S. commented on SOLR-5463: ------------------------------------ I have another idea about cursors implementation. That's just an idea, I am not sure if that's possible to do. Is it possible to use cursors together with "start" and "rows" parameters? That would allow to use pagination and draw links for prev, next, 1, 2, 3, n+1 pages, as we can do now. So that instead of using cursorMark we'll use cursorName, which could be a static. So the request start:0, rows:10, cursorName:* will return first page of results and a static cursor name, which could then be used for all other pages (i.e. start:10, rows:10, cursorName:#{received_cursor_name}). Does that make sense? > Provide cursor/token based "searchAfter" support that works with arbitrary sorting (ie: "deep paging") > ------------------------------------------------------------------------------------------------------ > > Key: SOLR-5463 > URL: https://issues.apache.org/jira/browse/SOLR-5463 > Project: Solr > Issue Type: New Feature > Reporter: Hoss Man > Assignee: Hoss Man > Fix For: 4.7, 5.0 > > Attachments: SOLR-5463-randomized-faceting-test.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man.patch, SOLR-5463__straw_man__MissingStringLastComparatorSource.patch > > > I'd like to revist a solution to the problem of "deep paging" in Solr, leveraging an HTTP based API similar to how IndexSearcher.searchAfter works at the lucene level: require the clients to provide back a token indicating the sort values of the last document seen on the previous "page". This is similar to the "cursor" model I've seen in several other REST APIs that support "pagnation" over a large sets of results (notable the twitter API and it's "since_id" param) except that we'll want something that works with arbitrary multi-level sort critera that can be either ascending or descending. > SOLR-1726 laid some initial ground work here and was commited quite a while ago, but the key bit of argument parsing to leverage it was commented out due to some problems (see comments in that issue). It's also somewhat out of date at this point: at the time it was commited, IndexSearcher only supported searchAfter for simple scores, not arbitrary field sorts; and the params added in SOLR-1726 suffer from this limitation as well. > --- > I think it would make sense to start fresh with a new issue with a focus on ensuring that we have deep paging which: > * supports arbitrary field sorts in addition to sorting by score > * works in distributed mode > {panel:title=Basic Usage} > * send a request with {{sort=X&start=0&rows=N&cursorMark=*}} > ** sort can be anything, but must include the uniqueKey field (as a tie breaker) > ** "N" can be any number you want per page > ** start must be "0" > ** "\*" denotes you want to use a cursor starting at the beginning mark > * parse the response body and extract the (String) {{nextCursorMark}} value > * Replace the "\*" value in your initial request params with the {{nextCursorMark}} value from the response in the subsequent request > * repeat until the {{nextCursorMark}} value stops changing, or you have collected as many docs as you need > {panel} -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org