Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 36620 invoked from network); 18 Dec 2009 14:09:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 14:09:24 -0000 Received: (qmail 7470 invoked by uid 500); 18 Dec 2009 14:09:22 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 7374 invoked by uid 500); 18 Dec 2009 14:09:22 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 7364 invoked by uid 99); 18 Dec 2009 14:09:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 14:09:22 +0000 X-ASF-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.221.203] (HELO mail-qy0-f203.google.com) (209.85.221.203) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 14:09:13 +0000 Received: by qyk41 with SMTP id 41so1504407qyk.29 for ; Fri, 18 Dec 2009 06:08:53 -0800 (PST) Received: by 10.229.59.203 with SMTP id m11mr1080684qch.94.1261145333181; Fri, 18 Dec 2009 06:08:53 -0800 (PST) Received: from ?192.168.0.101? ([206.80.251.146]) by mx.google.com with ESMTPS id 21sm2289208qyk.4.2009.12.18.06.08.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Dec 2009 06:08:52 -0800 (PST) Message-ID: <4B2B8CF6.4080004@polymtl.ca> Date: Fri, 18 Dec 2009 09:08:54 -0500 From: "=?ISO-8859-1?Q?Fran=E7ois_Eric?=" User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Query joining 2 indexes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hello, I have a performance problem and would need expert advice on how to go about fixing it: I currently have 2 indexes: Daily and Hourly. The Daily index contains about 1,000,000 documents and my Hourly index approximately: 24,000,000 documents. My Daily index contains many fields and some of them are IDs to my Hourly Index. What I want to do is fetch data in one request (if possible). Right now I do it in many requests: 1- Get the matching Daily documents (say it returns 500 documents) 2- For each of these documents, locate the Hourly Index Id and fetch it. Therefore I make 501 requests to lucene. This causes some performance issues I guess because of the overhead to making a request to Lucene. Is it possible to do this in 1 request? I'm thinking no because I'm not sure what the result set would be but maybe I'm missing something. If not I guess it would be possible to build a query with my 500 hourly ids and make a OR between them to make it in 2 requests....but then I have to find the matching documents. Will this overflow if I have 50000 ids in my query? Anyway, I just want advice on how one would address this situation. Thank you very much, Fran�ois --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org