Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 85606 invoked from network); 7 Nov 2010 09:54:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Nov 2010 09:54:52 -0000 Received: (qmail 63780 invoked by uid 500); 7 Nov 2010 09:55:21 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 63380 invoked by uid 500); 7 Nov 2010 09:55:18 -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 63372 invoked by uid 99); 7 Nov 2010 09:55:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 09:55:17 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of itsadok@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-wy0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 09:55:11 +0000 Received: by wyf19 with SMTP id 19so1321271wyf.35 for ; Sun, 07 Nov 2010 01:54:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=fbkms/YwTHHJOk79S5dqOSqQQK8SvsHT7lJJnNRubUg=; b=n3bttPgi7dV3tDz1YEe7nDBgs5zag9T7abcWutz3w3oaPcwSQA2R1r9/VMr+1xg/3R 0TPCmeed8y38xQctUWKMfAX+7cLJlZ8veZHo60Kb3fkvMTcBCyqDeo3Q1bFVrfXe26KD t6iRr46bPyVsaA2QKgz7p9o2yYh4MfCBROuP4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=JUxleD25MaI6CqE8yBIL1GITSoqhp8qVYRRK6sXTMPlv9YQk8YhFgZmgSJzcLNiquh Pi0qNOYV3R8AJu+5VY8GYYjVL7hQo4grHMNiu0bhc/fhh73zlkWJvimoyw+9JjuE1m42 W4e+UZAdk8MhnbKcoPUmUig0Fr56yKDnARKeg= Received: by 10.227.145.6 with SMTP id b6mr2745159wbv.163.1289123689454; Sun, 07 Nov 2010 01:54:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.68.193 with HTTP; Sun, 7 Nov 2010 01:54:29 -0800 (PST) In-Reply-To: <771399.17100.qm@web113305.mail.gq1.yahoo.com> References: <771399.17100.qm@web113305.mail.gq1.yahoo.com> From: Israel Tsadok Date: Sun, 7 Nov 2010 11:54:29 +0200 Message-ID: Subject: Re: Newbie Question To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016367fb64194dd1b0494737fd1 --0016367fb64194dd1b0494737fd1 Content-Type: text/plain; charset=ISO-8859-1 (If I may) In Lucene terminology, an "index" is what would be a "database" in RDBMS terminology. It's the whole thing. A document is akin to a row in a table. Most of the interesting stuff in lucene revolves around locating the document, not retrieving the data actually stored inside it. This is done using Term Vectors, Norms, Term Frequencies, Document Frequencies etc. These are not stored per document, but are rather properties of the whole index, and they are therefore similar to the concept of "index" in an RDBMS. I hope I didn't make to much of a mess trying to clear things up. I probably missed some parts and may have misrepresented others, but this is roughly how I look at it. Israel On Sun, Nov 7, 2010 at 11:09 AM, farouk alhassan wrote: > Thanks for your response. > I have already done that and understand the code perfectly. > > Just to rephrase my question > > What is the relationship between an index and a document at the conceptual > level. > > Does an index include a document or an index is a collection of documents? > > Also is index == document if there is only one document? > > Thanks > > --- On Sun, 7/11/10, Senthil wrote: > > From: Senthil > Subject: Re: Newbie Question > To: java-user@lucene.apache.org > Date: Sunday, 7 November, 2010, 8:30 > > Hi, > I recommend you to try simple indexer and searcher code from book which > clear the confusion. > > You need to specify the indexing folder and all the fields and values > selected for indexing will stored in that folder. And during search, it > searches from index and get the reference file path for search result too. > > regards > Senthil > > > On Sun, Nov 7, 2010 at 8:18 PM, farouk alhassan >wrote: > > > Hi All, > > > > I'm new to Lucene and have picked up the Lucene in Action book to get > > started. Really enjoying it but I have a small nagging question. > > > > Is the index stored in the same "physical document" as the fields and > > values? If not, where is it stored and how is it linked. > > > > This is because of this statement in the book > > > > When you retrieve a document from the index, only stored fields will be > > present. For example, fields that were indexed but not stored won't be in > > the document. This behavior > > is frequently a source of confusion > > > > Thanks > > Farouk A > > > > > > > > > > > --0016367fb64194dd1b0494737fd1--