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 B490AE2E4 for ; Sun, 10 Feb 2013 20:07:13 +0000 (UTC) Received: (qmail 78173 invoked by uid 500); 10 Feb 2013 20:07:12 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 78118 invoked by uid 500); 10 Feb 2013 20:07:12 -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 78110 invoked by uid 99); 10 Feb 2013 20:07:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2013 20:07:12 +0000 Date: Sun, 10 Feb 2013 20:07:12 +0000 (UTC) From: "Vadim Kirilchuk (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LUCENE-4768) Child Traversable To Parent Block Join Query 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/LUCENE-4768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vadim Kirilchuk updated LUCENE-4768: ------------------------------------ Description: Hi everyone! Let me describe what i am trying to do: I have hierarchical documents ('car model' as parent, 'trim' as child) and use block join queries to retrieve them. However, i am not happy with current behavior of ToParentBlockJoinQuery which goes through all parent childs during nextDoc call. Consider the following example, you have a query with custom post condition on top of such bjq: and during post condition you traverse scorers tree (doc-at-time) and want to manually push child scorers of bjq one by one until condition passes or current parent have no more childs. I am attaching the patch with query(and some tests) similar to ToParentBlockJoin but with an ability to traverse childs. (i have to do weird instance of check and cast inside my code) This is a draft only and i will be glad to hear if someone need it or to hear how we can improve it. P.s i believe that proposed query is more generic (low level) than ToParentBJQ and ToParentBJQ can be extended from it and call nextChild() internally during nextDoc(). Also, i think that the problem of traversing hierarchical documents is more complex as lucene have only nextDoc API. What do you think about making api more hierarchy aware? One level document is a special case of multi level document but not vice versa. WDYT? Thanks in advance. was: Hi everyone Let me describe what i am trying to do: I have hierarchical documents and use block join queries to retrieve them. However, i am not happy with current behavior of ToParentBlockJoinQuery which goes through all parent childs during nextDoc call. Consider the following example, you have a query with custom post condition on top of such bjq: and during post condition you traverse scorers tree (doc-at-time) and want to manually push child scorers of bjq one by one until condition passes or current parent have no more childs. I am attaching the patch with query(and some tests) similar to ToParentBlockJoin but with an ability to traverse childs. (i have to do weird instance of check and cast inside my code) This is a draft only and i will be glad to hear if someone need it or to hear how we can improve it. P.s i believe that proposed query is more generic (low level) than ToParentBJQ and ToParentBJQ can be extended from it and call nextChild() internally during nextDoc(). Also, i think that the problem of traversing hierarchical documents is more complex as lucene have only nextDoc API. What do you think about making api more hierarchy aware? One level document is a special case of multi level document but not vice versa. WDYT? Thanks in advance. > Child Traversable To Parent Block Join Query > -------------------------------------------- > > Key: LUCENE-4768 > URL: https://issues.apache.org/jira/browse/LUCENE-4768 > Project: Lucene - Core > Issue Type: Improvement > Components: core/query/scoring > Environment: trunk > git rev-parse HEAD > 5cc88eaa41eb66236a0d4203cc81f1eed97c9a41 > Reporter: Vadim Kirilchuk > Attachments: LUCENE-4768-draft.patch > > > Hi everyone! > Let me describe what i am trying to do: > I have hierarchical documents ('car model' as parent, 'trim' as child) and use block join queries to retrieve them. However, i am not happy with current behavior of ToParentBlockJoinQuery which goes through all parent childs during nextDoc call. > Consider the following example, you have a query with custom post condition on top of such bjq: and during post condition you traverse scorers tree (doc-at-time) and want to manually push child scorers of bjq one by one until condition passes or current parent have no more childs. > I am attaching the patch with query(and some tests) similar to ToParentBlockJoin but with an ability to traverse childs. (i have to do weird instance of check and cast inside my code) This is a draft only and i will be glad to hear if someone need it or to hear how we can improve it. > P.s i believe that proposed query is more generic (low level) than ToParentBJQ and ToParentBJQ can be extended from it and call nextChild() internally during nextDoc(). > Also, i think that the problem of traversing hierarchical documents is more complex as lucene have only nextDoc API. What do you think about making api more hierarchy aware? One level document is a special case of multi level document but not vice versa. WDYT? > Thanks in advance. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org