From java-user-return-51373-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon Nov 28 09:45:25 2011 Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 404E795E6 for ; Mon, 28 Nov 2011 09:45:25 +0000 (UTC) Received: (qmail 41752 invoked by uid 500); 28 Nov 2011 09:45:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 41709 invoked by uid 500); 28 Nov 2011 09:45:21 -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 41698 invoked by uid 99); 28 Nov 2011 09:45:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 09:45:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 09:45:14 +0000 Received: by iaqq3 with SMTP id q3so10779457iaq.35 for ; Mon, 28 Nov 2011 01:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Tk7Q6Oli30No0O08T9vCkr4KqijowNPM7BSYav7Smxk=; b=jF6zBRKGxBPUqUslgS8PpFzOWUC18I3K70cRh9WKjcwlxBwqgH5LKOHfwO5LfObn4f dt9iTard9Mb2F88IQeYo8WGRNcApJLgn9B6BtAzUJ1LvIGdM9uatJC4S3P747itjlzI2 cRPkBrz07IwSV8GjbC+fQ8LnLPzxl3yoneEbA= Received: by 10.50.42.166 with SMTP id p6mr18775345igl.17.1322473494072; Mon, 28 Nov 2011 01:44:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.103.69 with HTTP; Mon, 28 Nov 2011 01:44:33 -0800 (PST) In-Reply-To: References: From: Ian Lea Date: Mon, 28 Nov 2011 09:44:33 +0000 Message-ID: Subject: Re: Lucene on Android: indexing, searching and highlighting To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable As far as I'm aware recent versions of lucene, including the highlighter, should work out of the box. I'd guess that highlighting would be the most resource intensive and therefore troublesome bit. I'm not aware of any sample code showing lucene working on Android, but from my very limited experience of Android development I don't expect there to be any issues in invoking it. There are likely to be some lifecycle complications - you don't want Android killing your app when it is part way through an index update just because the app lost focus. If it was me, outside Android I'd write some self-contained classes wrapping lucene and doing what is needed, keeping the lucene activity short and sweet, and the whole thing as small and simple as possible, test them to destruction, then drop them into Android and see what happens. Good luck! -- Ian. On Wed, Nov 23, 2011 at 8:18 PM, Ilya Zavorin wrote: > Hello everyone, > > I need to write a Lucene-based search and retrieval app for Android. Unfo= rtunately, I am new to both Android development and Lucene, so I am going u= p two learning curves at the same time. > > My app needs to do the following: > 1. I have a collection of docs that I index > 2. I have a set of queries I run against the docs/index > 3. I need to find all "good" docs where at least one of the queries occur= s. > 4. I also need to find where in each of the good docs a hit occurs, i.e. = I need to "highlight" all the occurring queries in each of the docs. So may= be I need to compute pairs of pointers with each pair showing where a hit s= tarts and ends, or something similar. > > I will be using Lucene 3.4.0. It also looks like for #4 I will need to us= e highlighting capabilities. > > My main question is whether I should expect any performance problems at a= ny of the indexing/searching/highlighting steps? Can I use the lucene and h= ighlighting jars (lucene-core-3.4.0.jar and lucene-highlighter-3.4.0.jar) "= out of the box"? > > Also, is there any sample code that would show how Lucene components shou= ld be invoked on Android? > > Thank you, > > Ilya Zavorin > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org