Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 51437 invoked from network); 4 Nov 2009 01:50:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 01:50:18 -0000 Received: (qmail 73268 invoked by uid 500); 4 Nov 2009 01:50:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 73194 invoked by uid 500); 4 Nov 2009 01:50:15 -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 73184 invoked by uid 99); 4 Nov 2009 01:50:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 01:50:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chris.lu@gmail.com designates 209.85.160.46 as permitted sender) Received: from [209.85.160.46] (HELO mail-pw0-f46.google.com) (209.85.160.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 01:50:05 +0000 Received: by pwi12 with SMTP id 12so3156518pwi.5 for ; Tue, 03 Nov 2009 17:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=lKbb7kyPBjVVu90/hxYBs4AnCjDjQ/sSlRSMGKVL3HQ=; b=m4ENfghj3gLq/azw2pabFn04AIYyOhdLZ8SmtbymfhBHZWUgXuCVXauqm32XocxfK/ BZTuNurwfNFSjaqM8qFi27pxBMGbHu/dcdmwQMVD3IROEGUFyZMGIblLBsTIbYffaOMK Ig62X4HtPxdkvQMubWA+a3llhzi211RwMrp0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=vliYPx81xqktOcmp+Ov+rq1VbeoOgzppQdRciDjluwspLAvmPkCdfjmVmZ+8avB8hx FOkbAbQOdoUpC89WwBCPvC8Ezh2oA19boEAsE+rZr6Ox2E9QfI0uUu5if9CvxhDaKuPK UFhd22eLM569EDdIDvNOvyE2o7jgSiRLhzpDs= Received: by 10.115.149.4 with SMTP id b4mr1073679wao.18.1257299383495; Tue, 03 Nov 2009 17:49:43 -0800 (PST) Received: from ?10.1.1.122? (hq.compositesw.com [209.237.61.131]) by mx.google.com with ESMTPS id 22sm341411pxi.14.2009.11.03.17.49.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 17:49:42 -0800 (PST) Message-ID: <4AF0DDB2.9000405@gmail.com> Date: Tue, 03 Nov 2009 17:49:38 -0800 From: Chris Lu User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: Facets References: <1257234266.52242.ezmlm@lucene.apache.org> <4AF004AD.730E.0096.1@raa.se> In-Reply-To: <4AF004AD.730E.0096.1@raa.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org If the query is a very selective one, you can go through the XML document and do the counting. If the query is not so selective, which is usually the case, and the number of matches are large, basically all the values need to be loaded into memory, or solid state disk, to do a fast counting. -- Chris Lu ------------------------- Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro funding! Henrik Hjalmarsson wrote: > Hello > > I am trying to develop an API for a search application that is using Lucene 2.4.1 > The search application is maintained by RAA (swedish goverment organization that keeps track of historical and cultural data). > > I have gotten a demand for an API method that returns an XML response, listing all the indexes in this application and the number of unique values these indexes can have, filtered by a query that is recieved in the method request. > > The application contains a large amount of indexes and some indexes contains a very large amount of unique values. Is there some way to achive this in an effective way? > > With regards Henrik > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org