Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 33408 invoked from network); 20 Jul 2004 14:31:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Jul 2004 14:31:17 -0000 Received: (qmail 39381 invoked by uid 500); 20 Jul 2004 14:31:07 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 39358 invoked by uid 500); 20 Jul 2004 14:31:07 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 39342 invoked by uid 99); 20 Jul 2004 14:31:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [128.143.184.74] (HELO postfix.mail.ehatchersolutions.com) (128.143.184.74) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 20 Jul 2004 07:31:05 -0700 Received: from [127.0.0.1] (localhost [127.0.0.1]) by postfix.mail.ehatchersolutions.com (Postfix) with ESMTP id AD933826166 for ; Tue, 20 Jul 2004 10:31:09 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: <20040720140730.2FABD3958@sitemail.everyone.net> References: <20040720140730.2FABD3958@sitemail.everyone.net> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <70205950-DA59-11D8-81B3-000393A564E6@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: The indexer Date: Tue, 20 Jul 2004 10:31:07 -0400 To: "Lucene Users List" X-Mailer: Apple Mail (2.618) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Jul 20, 2004, at 10:07 AM, Ian McDonnell wrote: >> As for indexing data from mysql - there have been lots of discussions >> of that recently, so check the archives. Basically you read the data, >> and index it with Lucene's API. And you are responsible for keeping >> it >in sync. > > The problem i am having is reading the data from the sql tables and > then using the indexer to store it. Has anybody indexed from a mysql > table before? If so, do i need to create some kind of JDBC query that > selects all the field values from the table and indexes them in a > lucene document that is stored on the server? If i do this, how can > this process be automated rather than manually running the program > everytime a new profile is added via the jsp form? How you get the data from your database is really up to you. Some folks here may be able to offer some advice, but ultimately it is specific to your application and business process. Once you have the data, via some query (again, this is up to you how you do it) you use Lucene's IndexWriter, create new Document's, add Field's to them, add the document to the writer, then close the writer. That's all there is to indexing a document with Lucene. As for automation - again this is up to your application but certainly you can interact with a Lucene index from your application so that it is not a manual separate indexing step. > Erik, i'm not sure what you mean about keeping the db in sync. Are you > talking about stale or updated db entries? You need to ensure that when data changes, the index is updated to reflect those changes. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org