Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 54983 invoked from network); 2 Feb 2011 16:08:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 16:08:10 -0000 Received: (qmail 1935 invoked by uid 500); 2 Feb 2011 16:08:08 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1587 invoked by uid 500); 2 Feb 2011 16:08:03 -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 360 invoked by uid 99); 2 Feb 2011 16:07:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 16:07:58 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 02 Feb 2011 16:07:56 +0000 Received: (qmail 53888 invoked by uid 99); 2 Feb 2011 16:07:35 -0000 Received: from localhost.apache.org (HELO [10.0.0.15]) (127.0.0.1) (smtp-auth username gsingers, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 16:07:35 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: Payloads API and support From: Grant Ingersoll In-Reply-To: <4D47BD56.6000800@liveperson.com> Date: Wed, 2 Feb 2011 11:07:33 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <084CE8A3-4970-4D91-82FF-8592DE72D53F@apache.org> References: <4D47BD56.6000800@liveperson.com> To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org On Feb 1, 2011, at 2:59 AM, Ophir Cohen wrote: > Hi Guys, >=20 > I've been using Lucene for more than 5 years and it is a great tool - = great job! Thanks for everything... Thanks. Just so you know going forward, please be patient in expecting answers, = especially for complex questions like this that involve fairly expert = usages of Lucene. =46rom what I can tell, you have sent the same = question 3 times in a matter of less than a day. Sending more than once = in a 2-3 day period is just going to make it less likely that you will = get help, not more likely. Some suggestions inline below. >=20 >=20 > Lately I encountered the new payloads support and it looks its a great = solution for my project. >=20 >=20 > *The problem:* >=20 > The use case is as follows: >=20 > I need to support a way to calculate statistics on web pages. >=20 > Each page has few metrics that comes with it (how many user saw it, = what was the average time on page etc...). >=20 >=20 > The requirement is to support query such as: >=20 > How many users saw pages contains the tokens 'house' and 'white'. >=20 > Or >=20 > What was the average time on pages contains tokens 'horse' and 'pony'. >=20 >=20 > *First solution:* >=20 > Add pages to Lucene, index the words and store the metrics. >=20 > *The problem: performance.* >=20 > Not as regular search, I need to provide results for all matched = documents and those I need to iterate on all results and load the = document data. > This method take to much time. >=20 >=20 > *Better solution:* >=20 > Store the metrics as payloads and calculate the needed data without = access to the storage - a huge performance boost. >=20 I think the better solution is to use the first approach, but to use the = FieldCache on your metrics instead of stored documents and combine that = w/ a custom Collector. -------------------------- Grant Ingersoll http://www.lucidimagination.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org