From java-user-return-47683-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Tue Nov 02 14:53:57 2010 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 52854 invoked from network); 2 Nov 2010 14:53:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Nov 2010 14:53:56 -0000 Received: (qmail 16619 invoked by uid 500); 2 Nov 2010 14:54:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 16274 invoked by uid 500); 2 Nov 2010 14:54:25 -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 16266 invoked by uid 99); 2 Nov 2010 14:54:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 14:54:25 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bw0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 14:54:21 +0000 Received: by bwz19 with SMTP id 19so6335334bwz.35 for ; Tue, 02 Nov 2010 07:53:59 -0700 (PDT) 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=tjqjCWG5LA/7pBl0lfS6pdyM9zP/GylVBxZimZ/Blew=; b=aL51h6dZOECGwtk4zEzVbAjdTCyEI6DARZsGepV+DDh6fYvzo3JUcM/GbTFJGuhuQF 0wF6DL153r1AV/QjCP8bEkOiRI+uWIntdVrfpy1iPRXHNeM3VU5Lu/tC3GEKdXhnOZd0 By94XQ5O02LzClxRw48YmG4O7XlYkxa+jXHVg= 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=PNWi+iiSASxxpuOrumq5m3zmLh01vglVCcIWsI2Guuo1ALNKDYzLnPaq46i/eEwy9h wKUc1+XKW+CBIrFwwd3GCKgH8AmLUDaBrE59E5kvrAX3pW0lfgxOVh7bogAW1gI1CZiW q97C55gClkdN1411f+kXg0E8gLqU4CmWGvHMQ= Received: by 10.204.76.130 with SMTP id c2mr13045565bkk.26.1288709639491; Tue, 02 Nov 2010 07:53:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.121.145 with HTTP; Tue, 2 Nov 2010 07:53:39 -0700 (PDT) In-Reply-To: <80bd9fecd3bae9f2da359e71cbdec236@localhost> References: <80bd9fecd3bae9f2da359e71cbdec236@localhost> From: Ian Lea Date: Tue, 2 Nov 2010 14:53:39 +0000 Message-ID: Subject: Re: Simple search question To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Tokenizing and then passing through the query parser sounds reasonable to me. You could build the query yourself, but that will be a bit more work. You could also combine a non-wildcard search with a wildcard search, boosting the first one. So that "John Doe" would score higher than "Johnny Doncaster". -- Ian. On Tue, Nov 2, 2010 at 2:39 PM, Dirk Reske wrote: > No, we don't want to user to write the * itself. > And seperate fields for the first and the last name are also not > acceptable. > > Image all the social networks, where you type a part of a name into the > textbox, and get all people whose names (first or last) contains one of > your searched words. The user should not be thinking about...just doing > it. > > Dirk > > On Tue, 2 Nov 2010 20:00:08 +0530, findbestopensource > wrote: >> Yes. Correct. It would be good, If User inputs the search string with *. >> >> My Idea is to index two fields separately first name and last name. Provide >> two text boxes with first name and last name. Leave the rest to the User. >> >> Regrads >> Aditya >> www.findbestopensource.com >> >> >> >> On Tue, Nov 2, 2010 at 7:44 PM, Dirk Reske wrote: >> >>> Hello, >>> >>> we are quite new to lucene. >>> At first we want to create a simple user search for our web application. >>> My first thought was to map die 'display name' (= firstname + lastname) to >>> a single field (analysed but not stored) >>> and to put the database id of the user to a stored, not analysed field (but >>> indexed). >>> >>> Then the user should have a simple text box, where he should be able to >>> write the whole name, parts of the name etc... >>> So a search for "jo do" should also return the user "John Doe". How to >>> create the query? >>> >>> My first solution was to tokenize the string using whitespaces an add an * >>> to each word and then concatenate all the words and use the query parser, >>> so that the search string would be "jo* do*"...but then I've read, that I >>> should not programmaticly construct a string and use the queryparser. >>> >>> So what is the right way? >>> >>> Greets >>> Dirk >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >>> > > -- > Dirk Reske > Vogelsangstr. 24 > 18437 Stralsund > > mail: dirk@studiorga.de > mobile: +(49) 1522 2104741 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org