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 4EC2C184F3 for ; Mon, 5 Oct 2015 17:01:08 +0000 (UTC) Received: (qmail 74517 invoked by uid 500); 5 Oct 2015 17:01:06 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 74473 invoked by uid 500); 5 Oct 2015 17:01:06 -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 73451 invoked by uid 99); 5 Oct 2015 17:01:05 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2015 17:01:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 68D2D1809BA for ; Mon, 5 Oct 2015 17:01:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.9 X-Spam-Level: *** X-Spam-Status: No, score=3.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, KAM_INFOUSMEBIZ=0.75, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MN5C1cBzQR8x for ; Mon, 5 Oct 2015 17:00:55 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 92F262031C for ; Mon, 5 Oct 2015 17:00:55 +0000 (UTC) Received: by obcgx8 with SMTP id gx8so133427351obc.3 for ; Mon, 05 Oct 2015 10:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QdF7zCfq7DtTgSpIoHxQEMRc+W0EZv1qiHs5ct/T1Lw=; b=fIBMjl09Hz8W16A9rWDmVdpGdBEBmpaz8bfwepF/UmPDid4Wc3wXjFVmY4bE5tIXjl b6bPGv8VhheSRxb3yo8hZx1lGHK7AGj1B3IrtF35e7G/PxJ50LlS97nykf9t15cFkMaA ZGICk8ufOrGgmm9/WVI1STk/awN6jPEjtcgoCAGc1WsUoJ4ihfCGSfB/os1KMGURsshM NyPyZtEgTTFrxuvjUboX6TWiZ0fnFkn+OBBOgtl0dU9o5zH6rxVKAjHqeHO90rKgIOOt R/A0yEQmAqOumDwsKA/dX3RN//NTb0zTLPcl2zN/qXt5nbCWbtevqrKg4fNWhG+t2/78 AI/Q== MIME-Version: 1.0 X-Received: by 10.182.96.168 with SMTP id dt8mr17538745obb.36.1444064454597; Mon, 05 Oct 2015 10:00:54 -0700 (PDT) Received: by 10.202.75.76 with HTTP; Mon, 5 Oct 2015 10:00:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Oct 2015 18:00:54 +0100 Message-ID: Subject: Re: need help in search From: Alessandro Benedetti To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b2e489ad9866405215e7486 --047d7b2e489ad9866405215e7486 Content-Type: text/plain; charset=UTF-8 +1 on Jack, furthermore, are you taking about search or autocomplete ? If you only need autocompletion on the term, maybe it's even better if you take a look to the Lucene suggest module ! Cheers 2015-10-05 14:34 GMT+01:00 Jack Krupansky : > Sounds like you need the edge n-gram filter at index time to index all of > the prefix strings for each term. Just be aware that using an n-gram filter > will explode the size of the index (all the extra terms) > > The standard tokenizer and word delimiter filter will split terms on > special characters, so if you need to keep that entire string as one term, > use the whitespace tokenizer. That said, treating hyphen as a word break is > usually not a problem as long as you enable auto phrase generation for the > query parser. > > -- Jack Krupansky > > On Mon, Oct 5, 2015 at 4:06 AM, Bhaskar wrote: > > > Hi, > > > > > > when I type 143-00098 I should get all matched result i.e ( 143-00098, > > 143-000981, 143-0009823). also If i type 143-000 then i should 143-00098, > > 143-0009, 143-0001) > > > > Looks like the searching is treating "-"( hyphen) as subtract or exclude > > pages that contain a specific term.. > > In my case it should not exclude string after hyphen. > > can you please help how to escape this. > > > > Thanks a lot. > > > > -- > > Keep Smiling.... > > Thanks & Regards > > Bhaskar. > > Mobile:9866724142 > > > -- -------------------------- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England --047d7b2e489ad9866405215e7486--