From java-user-return-64437-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Sun Jun 16 02:43:20 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0DF1618064D for ; Sun, 16 Jun 2019 04:43:19 +0200 (CEST) Received: (qmail 50869 invoked by uid 500); 16 Jun 2019 02:43:17 -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 50854 invoked by uid 99); 16 Jun 2019 02:43:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Jun 2019 02:43:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4BC86C084C for ; Sun, 16 Jun 2019 02:43:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.5 X-Spam-Level: X-Spam-Status: No, score=-1.5 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, KAM_ASCII_DIVIDERS=0.8, KAM_MANYTO=0.2, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=oracle.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Pwv3_oO8zOdO for ; Sun, 16 Jun 2019 02:43:11 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 72E0D5FBC9 for ; Sun, 16 Jun 2019 02:43:11 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5G2YIBn114390; Sun, 16 Jun 2019 02:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=6JujkhnP8OytGtTxBgGu4pWJQc4f005mDs+Kn42L/sI=; b=PLNnN/9llsfohdmFDc4Q/0stZPpr9PZXE5psweF5rdzOTL0rkJRPewQb/tvFKibg1Rew wH59bstBd/odo2qIKgjb3T3dU9Ew/NVXU2oykNqZVhCoVQeL5rYdLlalc2943SYoD6Oi b9K9XFsrMuNEHlrM7Up13Zw/A2fMulbR8/L/kJvAd6kUgm+O0iwKdCijaMyEVS9hqxb3 6Yji8e38fU8tUaMXM8LaruhN8d3w+DqiOG1p35NbHRSGWRpcAqLwo321CGEVbuYYBxC5 aL3e8H4uuGYJ58cQHy0t/4onhuw1IwmI7oR8zNS3uRctwWPOW1DMwjVsWW1+P94jUiXt xw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2t4r3ta0gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Jun 2019 02:43:03 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5G2fU0S169449; Sun, 16 Jun 2019 02:43:03 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2t59gcs7r6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Jun 2019 02:43:02 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5G2gxBZ002925; Sun, 16 Jun 2019 02:43:00 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 15 Jun 2019 19:42:59 -0700 (PDT) From: Baris Kazar To: , , , , , Subject: Re: FuzzyQuery- why is it ignored? X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9289 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906160023 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9289 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906160023 Hello,- Erick explained how to disable stemming in Solr but i am using Lucene pure= ly. i am also researching how to disable it in Lucene but if You have instructi= ons how to do so already i appreciate if You could share here. Best regards ----- Original Message ----- From: baris.kazar@oracle.com To: java-user@lucene.apache.org, tomoko.uchida.1111@gmail.com, erickerickso= n@gmail.com, atri@linux.com, baris.kazar@oracle.com, lucene@mikemccandless.= com Sent: Thursday, June 13, 2019 10:48:47 AM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery- why is it ignored? i see, i am using an older version 6.6 and we should switch to Your 8.1=20 version of at least 7.X. Tomoko i think i understood You meant MAIN NASHUA .... for the string :) Again i really appreciate all answers. How do we disable or enable stemming while indexing? :) another question. Best regards On 6/13/19 10:40 AM, Tomoko Uchida wrote: > Sorry, I made a mistake when copypasting. Let me just correct my previous= mail. > >> 1. Indexed this text: "NASHUA NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED S= TATES". > 1. Indexed this text: "MAIN DUNSTABLE NASHUA HILLSBOROUGH NEW > HAMPSHIRE UNITED STATES" > > ---- > As far as I can say, this query correctly find the indexed document > (so I have no idea about what is wrong with fuzzy query). > +contentDFLT:mains~2 +contentDFLT:"nashua" > +contentDFLT:"new-hampshire" +contentDFLT:"united states" > > I am > - using lucene 8.1. > - using standard analyzer for both of indexing and searching. > - using classic query parser for parsing. > > > > 2019=E5=B9=B46=E6=9C=8813=E6=97=A5(=E6=9C=A8) 23:18 : >> However, the index does not have MAINS but MAIN for the expected entry. >> >> Best regards >> >> >> >> On 6/13/19 10:33 AM, baris.kazar@oracle.com wrote: >>> does it consider it as like plural word? :) :) :) >>> That makes sense. >>> >>> Best regards >>> >>> >>> On 6/13/19 10:31 AM, baris.kazar@oracle.com wrote: >>>> Erick, >>>> >>>> Cool, could You give a simple example with my example please? >>>> >>>> Best regards >>>> >>>> >>>> >>>> On 6/13/19 10:12 AM, Erick Erickson wrote: >>>>> Shot in the dark: stemming. Whenever I see a problem with something >>>>> ending in =E2=80=9Cs=E2=80=9D (or =E2=80=9Cer=E2=80=9D or =E2=80=9Cin= g=E2=80=9D or=E2=80=A6.) my first suspect is that >>>>> stemming is turned on. In that case the token in the index that=E2=80= =99s >>>>> actually searched on is somewhat different than you expect. >>>>> >>>>> The test is easy, just insure your fieldType contains no stemmers. >>>>> PorterStemmer is particularly aggressive, but for this case to test >>>>> I=E2=80=99d just remove all stemming, re-index and see if the results= differ. >>>>> >>>>> Best, >>>>> Erick >>>>> >>>>>> On Jun 13, 2019, at 7:26 AM, baris.kazar@oracle.com wrote: >>>>>> >>>>>> Tomoko,- >>>>>> >>>>>> That is strange indeed. >>>>>> >>>>>> Something is wrong when i use mains but maink, mainl, mainr,mainq, >>>>>> maint all work ok any consonant at the end except s works in this >>>>>> case. >>>>>> >>>>>> Case #3 had +contentDFLT:mains~2 but not +contentDFLT:"mains~2". >>>>>> >>>>>> i am using fuzzy query with ~ from Query.builder and that is not >>>>>> PhraseQuery. >>>>>> >>>>>> Similarly FuzzyQuery with input "mains" (it has to be lowercase >>>>>> since it does not go through StandardAnalyzer) is also not >>>>>> PhraseQuery. >>>>>> >>>>>> can there be a clearer sample case for ComplexPhraseQuery please in >>>>>> the docs? >>>>>> >>>>>> did You also index "MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED >>>>>> STATES" the expected output in this case? >>>>>> >>>>>> Thanks for spending time on this, i would like to thank everyone. >>>>>> >>>>>> Best regards >>>>>> >>>>>> >>>>>> On 6/13/19 12:13 AM, Tomoko Uchida wrote: >>>>>>> Hi, >>>>>>> >>>>>>>> Ok, i think only this very specific only "mains" has an issue. >>>>>>> It looks strange to me. I did some test locally. >>>>>>> >>>>>>> 1. Indexed this text: "NASHUA NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>> UNITED STATES". >>>>>>> >>>>>>> 2a. This query string (just copied from your Case #3) worked >>>>>>> correctly >>>>>>> for me as far as I can see. >>>>>>> +contentDFLT:mains~2 +contentDFLT:"nashua", >>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united state" >>>>>>> >>>>>>> 2b. However this query string got no results. >>>>>>> +contentDFLT:"mains~2", +contentDFLT:"nashua", >>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united states" >>>>>>> It is an expected behaviour because the classic query parser does n= ot >>>>>>> support fuzzy query inside phrase query (as far as I know). >>>>>>> >>>>>>> I suspect you use fuzzy query operator (~) inside phrase query >>>>>>> ("), as >>>>>>> the 2b case. >>>>>>> >>>>>>> FYI: there is a special parser for such complex phrase query. >>>>>>> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__lucene.apach= e.org_core_8-5F1-5F0_queryparser_org_apache_lucene_queryparser_complexPhras= e_ComplexPhraseQueryParser.html&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7q= IrMUB65eapI_JnE&r=3DnlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=3DZcXpaSl= wS5DegX76mHTb_6DH3P7noan1eeMXc-Vh5M8&s=3DFoIMlcjDO2b7Gut9XRx-NIBWiBQWItsj8I= lylJC7Wkc&e=3D >>>>>>> >>>>>>> >>>>>>> Tomoko >>>>>>> >>>>>>> 2019=E5=B9=B46=E6=9C=8813=E6=97=A5(=E6=9C=A8) 6:16 : >>>>>>>> Ok, i think only this very specific only "mains" has an issue. >>>>>>>> >>>>>>>> all i knew about Lucene was fine :) Great... >>>>>>>> >>>>>>>> i have one more question: >>>>>>>> >>>>>>>> which one is advised to use: FuzzyQuery or the Query.parser with >>>>>>>> search string~ appended? >>>>>>>> >>>>>>>> The second one will go through analyzer and make search string >>>>>>>> lowercase. >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/12/19 1:03 PM, baris.kazar@oracle.com wrote: >>>>>>>> >>>>>>>> Hi again,- >>>>>>>> >>>>>>>> this is really interesting and i hope i am missing something. >>>>>>>> Index small cases all entries so case sensitivity is not an issue >>>>>>>> i think. >>>>>>>> >>>>>>>> Case #1: >>>>>>>> >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser parser =3D new >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser(field, >>>>>>>> phraseAnalyzer) ; >>>>>>>> Query q1 =3D null; >>>>>>>> try { >>>>>>>> q1 =3D parser.parse("Main"); >>>>>>>> } catch (ParseException e) { >>>>>>>> e.printStackTrace(); >>>>>>>> } >>>>>>>> booleanQuery.add(q1, BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NASHUA"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NEW HAMPSHIRE"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "UNITED STATES"), BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> >>>>>>>> This brings with this: >>>>>>>> >>>>>>>> query plan: >>>>>>>> >>>>>>>> [+contentDFLT:main, +contentDFLT:"nashua", >>>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united states"] >>>>>>>> >>>>>>>> testQuerySearch1 Time to compute: 0 seconds (copied answer after >>>>>>>> exec finished) >>>>>>>> >>>>>>>> Number of results: 12 >>>>>>>> Name: Main Dunstable Rd >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12677400 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.72631, -71.50269 >>>>>>>> Search Key: MAIN DUNSTABLE NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>>> UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681980 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76416, -71.46681 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681973 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75045, -71.4607 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681974 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76019, -71.465 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main Dunstable Rd >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12677399 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.74641, -71.48943 >>>>>>>> Search Key: MAIN DUNSTABLE NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>>> UNITED STATES >>>>>>>> >>>>>>>> Name: S Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 11893215 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73412, -71.44797 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681978 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73492, -71.44951 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: S Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 11893214 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73958, -71.45895 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681979 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76416, -71.46681 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.204945 >>>>>>>> ID: 12681977 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.747, -71.45957 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Case #2 >>>>>>>> >>>>>>>> When i did this it also worked by adding ~ to make it Fuzzy query >>>>>>>> to Main word: >>>>>>>> >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser parser =3D new >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser(field, >>>>>>>> phraseAnalyzer) ; >>>>>>>> Query q1 =3D null; >>>>>>>> try { >>>>>>>> q1 =3D parser.parse("Main~"); >>>>>>>> } catch (ParseException e) { >>>>>>>> e.printStackTrace(); >>>>>>>> } >>>>>>>> booleanQuery.add(q1, BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NASHUA"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NEW HAMPSHIRE"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "UNITED STATES"), BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> >>>>>>>> query plan: >>>>>>>> >>>>>>>> [+contentDFLT:main~2, +contentDFLT:"nashua", >>>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united states"] >>>>>>>> >>>>>>>> testQuerySearch1 Time to compute: 24 seconds (due to debugging >>>>>>>> stops) >>>>>>>> Number of results: 12 >>>>>>>> Name: Main Dunstable Rd >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12677400 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.72631, -71.50269 >>>>>>>> Search Key: MAIN DUNSTABLE NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>>> UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681980 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76416, -71.46681 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681973 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75045, -71.4607 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681974 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76019, -71.465 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main Dunstable Rd >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12677399 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.74641, -71.48943 >>>>>>>> Search Key: MAIN DUNSTABLE NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>>> UNITED STATES >>>>>>>> >>>>>>>> Name: S Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 11893215 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73412, -71.44797 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681978 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73492, -71.44951 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: S Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 11893214 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73958, -71.45895 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681979 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76416, -71.46681 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 41.06405 >>>>>>>> ID: 12681977 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.747, -71.45957 >>>>>>>> Search Key: MAIN NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Case #3 >>>>>>>> >>>>>>>> But why does this not work with fuzzy mode and i misspelled a bit >>>>>>>> (1 edit away) and as You saw the data is there with Main spelling: >>>>>>>> >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser parser =3D new >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser(field, >>>>>>>> phraseAnalyzer) ; >>>>>>>> >>>>>>>> Query q1 =3D null; >>>>>>>> try { >>>>>>>> q1 =3D parser.parse("Mains~"); // 1 edit away >>>>>>>> } catch (ParseException e) { >>>>>>>> e.printStackTrace(); >>>>>>>> } >>>>>>>> booleanQuery.add(q1, BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NASHUA"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NEW HAMPSHIRE"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "UNITED STATES"), BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> query plan: >>>>>>>> >>>>>>>> [+contentDFLT:mains~2, +contentDFLT:"nashua", >>>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united states"] >>>>>>>> >>>>>>>> testQuerySearch1 Time to compute: 23 seconds (due to debugging >>>>>>>> stops) >>>>>>>> >>>>>>>> Number of results: 0 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Case #4 >>>>>>>> >>>>>>>> Then i changed q1 to SHOULD from MUST above: and i think fuzzy >>>>>>>> query is ignored here since there is no MAIN in the first 468 >>>>>>>> resuls: >>>>>>>> >>>>>>>> there is no boost for Mains term here. >>>>>>>> >>>>>>>> query plan: >>>>>>>> >>>>>>>> [contentDFLT:mains~2, +contentDFLT:"nashua", >>>>>>>> +contentDFLT:"new-hampshire", +contentDFLT:"united states"] >>>>>>>> >>>>>>>> testQuerySearch1 Time to compute: 125 seconds (due to debugging >>>>>>>> stops) >>>>>>>> Number of results: 1794 >>>>>>>> Name: Nashua Dr >>>>>>>> Score: 34.186226 >>>>>>>> ID: 4974936 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.7636, -71.46063 >>>>>>>> Search Key: NASHUA NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Nashua River Rail Trl >>>>>>>> Score: 34.186226 >>>>>>>> ID: 4975508 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.7062, -71.53962 >>>>>>>> Search Key: NASHUA RIVER RAIL NASHUA HILLSBOROUGH NEW HAMPSHIRE >>>>>>>> UNITED STATES >>>>>>>> >>>>>>>> Name: Nashua Rd >>>>>>>> Score: 33.84896 >>>>>>>> ID: 4975388 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.78746, -71.92823 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: NASHUA >>>>>>>> Score: 33.84896 >>>>>>>> ID: 21014865 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75873, -71.46438 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: NASHUA >>>>>>>> Score: 33.84896 >>>>>>>> ID: 21014865 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75873, -71.46438 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: NASHUA >>>>>>>> Score: 33.84896 >>>>>>>> ID: 21014865 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75873, -71.46438 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: NASHUA >>>>>>>> Score: 33.84896 >>>>>>>> ID: 21014865 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75873, -71.46438 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: NASHUA >>>>>>>> Score: 33.84896 >>>>>>>> ID: 21014865 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.75873, -71.46438 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Nashua St >>>>>>>> Score: 33.84896 >>>>>>>> ID: 4975671 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.88471, -70.81687 >>>>>>>> Search Key: NASHUA ROCKINGHAM NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> Name: Nashua Rd >>>>>>>> Score: 33.84896 >>>>>>>> ID: 4975400 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.79014, -71.92364 >>>>>>>> Search Key: NASHUA HILLSBOROUGH NEW HAMPSHIRE UNITED STATES >>>>>>>> >>>>>>>> >>>>>>>> Why is the fuzzy query ignored? >>>>>>>> Even if i have separate fields for street, city,region, country, >>>>>>>> this fuzzy query issue will come into place for words with >>>>>>>> multiple parts like main dunstable etc., right? >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> On 6/12/19 11:36 AM, baris.kazar@oracle.com wrote: >>>>>>>> >>>>>>>> Tomoko,- >>>>>>>> >>>>>>>> Thank You for Your suggestions. i am trying to understand it >>>>>>>> and i thought i did :) >>>>>>>> >>>>>>>> but it does not work with FuzzyQuery when i used with a *single* >>>>>>>> large TextField like street=3D...value... city=3D...value... >>>>>>>> region=3D...value... country=3D...value... (with or without quotes >>>>>>>> for the values) >>>>>>>> >>>>>>>> What i knew about Lucene fuzzy queries are not holding now with >>>>>>>> this Textfield form. That is why i suspected of a bug. >>>>>>>> >>>>>>>> 1. Yes, i saw and have a solid proof on that now. >>>>>>>> >>>>>>>> 2. yes but FuzzyQuery takes quotes as they are as they are >>>>>>>> escaped and it is not analyzed. >>>>>>>> >>>>>>>> Stuffing into one textfield vs having separate fields should only >>>>>>>> affect probably the performance but not the outcome in my case. >>>>>>>> But, i have been thinking about this and maybe it is the way to >>>>>>>> go in this case. >>>>>>>> >>>>>>>> mY CONTENT field has street names in mixed case and city, region >>>>>>>> country names in UPPERCASE. Can this be a problem? >>>>>>>> i thought index stored them in lowercase since i am using >>>>>>>> StandardAnalyzer. >>>>>>>> >>>>>>>> CONTENT field also has full textfield string with street=3D... >>>>>>>> city=3D... region=3D... country=3D... (here all values are UPPERCA= SE). >>>>>>>> >>>>>>>> Why cant the index find the names via FuzzyQuery? i tried both >>>>>>>> FuzzyQuery and Query builder as i showed before. >>>>>>>> >>>>>>>> The last advice in Your previous email would nicely go outside >>>>>>>> the parantheses since it might be very critical :) :) :) >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/12/19 12:17 AM, Tomoko Uchida wrote: >>>>>>>> >>>>>>>> I'd suggest to correctly understand the way a software works befor= e >>>>>>>> suspecting its bug :-) >>>>>>>> >>>>>>>> I guess you may miss two points: >>>>>>>> >>>>>>>> 1. the standard analyzer (standard tokenizer) breaks words by doub= le >>>>>>>> quote (U+0022) so quotes are not indexed or searched at all if >>>>>>>> you are >>>>>>>> using standard analyzer. (That is the reason you have same results >>>>>>>> with or without quotes.) >>>>>>>> See: >>>>>>>> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__lucene.apac= he.org_core_8-5F1-5F0_core_org_apache_lucene_analysis_standard_StandardToke= nizer.html&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=3Dn= lG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=3D1L6ZQKxmWmYxDX4uJHxzY5SAR_UC= l6UUXCo916wzXCo&s=3D8E2lp1YIGM-3v3FspeieGl8z8rEBs6qioTudtFNzh8c&e=3D >>>>>>>> and >>>>>>>> https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__unicode.org_= reports_tr29_&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r= =3DnlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=3D1L6ZQKxmWmYxDX4uJHxzY5SA= R_UCl6UUXCo916wzXCo&s=3DriCZ_f25XW869CKbHPUqfbLiDU-AukE6la0xTLMw6u8&e=3D >>>>>>>> >>>>>>>> 2. double quote has special meaning (it's interpreted as phrase >>>>>>>> query) >>>>>>>> with the built-in query parser so you need to escape it if you >>>>>>>> want to >>>>>>>> search double quotes itself. >>>>>>>> See: >>>>>>>> https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__lucene.apach= e.org_core_8-5F1-5F0_queryparser_org_apache_lucene_queryparser_classic_pack= age-2Dsummary.html-23Terms&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB= 65eapI_JnE&r=3DnlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=3D1L6ZQKxmWmYx= DX4uJHxzY5SAR_UCl6UUXCo916wzXCo&s=3Dt8OYTgidvcwNpAVFuTsqGhDJK5BwUZVCxc0mPHz= qCYU&e=3D >>>>>>>> >>>>>>>> (My advice would be to create separate fields for each key value >>>>>>>> pairs >>>>>>>> instead of stuffing all pairs into one text field, if you need to >>>>>>>> search them separately.) >>>>>>>> >>>>>>>> 2019=E5=B9=B46=E6=9C=8812=E6=97=A5(=E6=B0=B4) 2:39 : >>>>>>>> >>>>>>>> i can say that quotes is not the issue with index as it still >>>>>>>> results in >>>>>>>> same results with quotes or without quotes. >>>>>>>> >>>>>>>> i am starting to feel that this might be a bug maybe?? >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 2:46 PM, baris.kazar@oracle.com wrote: >>>>>>>> >>>>>>>> Somehow " is causing an issue as this should return street with >>>>>>>> MAIN: >>>>>>>> >>>>>>>> [contentDFLT:street=3D"MAINS"~2, +contentDFLT:"city nashua", >>>>>>>> +contentDFLT:"region new-hampshire", +contentDFLT:"country united >>>>>>>> states"] -> this was with fuzzyquery on MAINS >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 2:24 PM, baris.kazar@oracle.com wrote: >>>>>>>> >>>>>>>> [+contentDFLT:"city nashua", +contentDFLT:"region new-hampshire", >>>>>>>> +contentDFLT:"country united states", contentDFLT:street >>>>>>>> contentDFLT:mains] >>>>>>>> >>>>>>>> QueeryParser chops it into two pieces from >>>>>>>> parser.parser("street=3D\"MAINS\""); >>>>>>>> >>>>>>>> Index has a TextField named contentDFLT the following data : >>>>>>>> street=3D"MAIN" city=3D"NASHUA" municipality=3D"HILLSBOROUGH" regi= on=3D"NEW >>>>>>>> HAMPSHIRE" country=3D"UNITED STATES" >>>>>>>> >>>>>>>> >>>>>>>> When i set street=3D\"MAINS~\" with parser: >>>>>>>> i get the following >>>>>>>> [+contentDFLT:"city nashua", +contentDFLT:"region new-hampshire", >>>>>>>> +contentDFLT:"country united states", contentDFLT:street >>>>>>>> contentDFLT:mains] >>>>>>>> >>>>>>>> probably " quotations are messing this up as You were saying... >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 12:48 PM, Tomoko Uchida wrote: >>>>>>>> >>>>>>>> Or, " (double quotation) in your query string may affect query >>>>>>>> parsing. >>>>>>>> >>>>>>>> When I parse this string by classic query parser (lucene 8.1), >>>>>>>> street=3D"MAINS~" >>>>>>>> parsed (raw) query is >>>>>>>> text:street text:mains >>>>>>>> (I set the default search field to "text", so text:xxxx is appeare= d >>>>>>>> here.) >>>>>>>> >>>>>>>> Query parsing is a complex process, so it would be good to check >>>>>>>> parsed raw query string especially when you have (reserved) specia= l >>>>>>>> characters in your query... >>>>>>>> >>>>>>>> 2019=E5=B9=B46=E6=9C=8811=E6=97=A5(=E7=81=AB) 1:10 Tomoko Uchida <= tomoko.uchida.1111@gmail.com>: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I noticed one small thing in your previous mail. >>>>>>>> >>>>>>>> when i use q1 =3D parser.parse("street=3D\"MAIN\""); i get same re= sults >>>>>>>> >>>>>>>> which is good. >>>>>>>> >>>>>>>> To specify a search field, ":" (colon) should be used instead of >>>>>>>> "=3D". >>>>>>>> See the query parser documentation: >>>>>>>> https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__lucene.apach= e.org_core_8-5F1-5F0_queryparser_org_apache_lucene_queryparser_classic_pack= age-2Dsummary.html-23Fields&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMU= B65eapI_JnE&r=3DnlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=3Du4SeJqH4leP= hOazCLwxLEr3WqcMkODtYLv4njiKZ4PM&s=3DWrNfUXO9gz1PqpczTJw1vD9sWqvr76WRv2Aeo9= uWqa4&e=3D >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I'm not sure this is related to your problem. >>>>>>>> >>>>>>>> 2019=E5=B9=B46=E6=9C=8811=E6=97=A5(=E7=81=AB) 0:51 : >>>>>>>> >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "city=3D\"NASHUA\""), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "region=3D\"NEW HAMPSHIRE\""), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "country=3D\"UNITED STATES\""), BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser parser =3D new >>>>>>>> org.apache.lucene.queryparser.classic.QueryParser(field, >>>>>>>> phraseAnalyzer) ; >>>>>>>> Query q1 =3D null; >>>>>>>> try { >>>>>>>> q1 =3D parser.parse("MAIN"); >>>>>>>> } catch (ParseException e) { >>>>>>>> >>>>>>>> e.printStackTrace(); >>>>>>>> } >>>>>>>> booleanQuery.add(q1, BooleanClause.Occur.SHOULD); >>>>>>>> >>>>>>>> testQuerySearch2 Time to compute: 0 seconds >>>>>>>> Number of results: 1775 >>>>>>>> Name: Main St >>>>>>>> Score: 37.20959 >>>>>>>> ID: 12681979 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.76416, -71.46681 >>>>>>>> Search Key: street=3D"MAIN" city=3D"NASHUA" municipality=3D"HILLSB= OROUGH" >>>>>>>> region=3D"NEW HAMPSHIRE" country=3D"UNITED STATES" >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 37.20959 >>>>>>>> ID: 12681977 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.747, -71.45957 >>>>>>>> Search Key: street=3D"MAIN" city=3D"NASHUA" municipality=3D"HILLSB= OROUGH" >>>>>>>> region=3D"NEW HAMPSHIRE" country=3D"UNITED STATES" >>>>>>>> >>>>>>>> Name: Main St >>>>>>>> Score: 37.20959 >>>>>>>> ID: 12681978 >>>>>>>> Country Code: US >>>>>>>> Coordinates: 42.73492, -71.44951 >>>>>>>> Search Key: street=3D"MAIN" city=3D"NASHUA" municipality=3D"HILLSB= OROUGH" >>>>>>>> region=3D"NEW HAMPSHIRE" country=3D"UNITED STATES" >>>>>>>> >>>>>>>> when i use q1 =3D parser.parse("street=3D\"MAIN\""); i get s= ame >>>>>>>> results >>>>>>>> which is good. >>>>>>>> >>>>>>>> But when i switch to MAINS~ then fuzzy query does not work. >>>>>>>> >>>>>>>> >>>>>>>> i need to say something with the q1 only in the booleanquery: >>>>>>>> it tries to match the MAIN in street, city, region and country >>>>>>>> which are >>>>>>>> in a single TextField field. >>>>>>>> But i dont want this. that is why i need to street=3D"..." etc whe= n >>>>>>>> searching. >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 11:31 AM, Tomoko Uchida wrote: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> just for the basic verification, can you find the document without >>>>>>>> fuzzy query? I mean, does this query work for you? >>>>>>>> >>>>>>>> Query query =3D parser.parse("MAIN"); >>>>>>>> >>>>>>>> Tomoko >>>>>>>> >>>>>>>> 2019=E5=B9=B46=E6=9C=8811=E6=97=A5(=E7=81=AB) 0:22 : >>>>>>>> >>>>>>>> why cant the second set not work at all? >>>>>>>> >>>>>>>> it is indexed as Textfield like street=3D"..." city=3D"..." etc. >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 11:23 AM, baris.kazar@oracle.com wrote: >>>>>>>> >>>>>>>> i dont know how to use Fuzzyquery with queryparser but probably >>>>>>>> You >>>>>>>> are suggesting >>>>>>>> >>>>>>>> QueryParser parser =3D new QueryParser(field, analyzer) ; >>>>>>>> Query query =3D parser.parse("MAINS~2"); >>>>>>>> >>>>>>>> booleanQuery.add(query, BooleanClause.Occur.SHOULD); >>>>>>>> >>>>>>>> am i right? >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 10:47 AM, Atri Sharma wrote: >>>>>>>> >>>>>>>> I would suggest using a QueryParser for your fuzzy query before >>>>>>>> adding it to the Boolean query. This should weed out any case >>>>>>>> issues. >>>>>>>> >>>>>>>> On Mon, 10 Jun 2019 at 8:06 PM, >>>>>>> > wrote: >>>>>>>> >>>>>>>> BooleanQuery.Builder booleanQuery =3D new >>>>>>>> BooleanQuery.Builder(); >>>>>>>> >>>>>>>> //First set >>>>>>>> >>>>>>>> booleanQuery.add(new FuzzyQuery(new >>>>>>>> org.apache.lucene.index.Term(field, "MAINS")), >>>>>>>> BooleanClause.Occur.SHOULD); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NASHUA"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "NEW HAMPSHIRE"), BooleanClause.Occur.MUST); >>>>>>>> booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, >>>>>>>> "UNITED STATES"), BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> // Second set >>>>>>>> //booleanQuery.add(new FuzzyQuery(new >>>>>>>> org.apache.lucene.index.Term(field, "street=3D\"MAINS\"")= ), >>>>>>>> BooleanClause.Occur.SHOULD); >>>>>>>> //booleanQuery.add(Utils.createPhraseQueryFullText(phraseAnalyzer, >>>>>>>> >>>>>>>> field, "city=3D\"NASHUA\""), BooleanClause.Occur.MUST); >>>>>>>> //booleanQuery.add(Utils.createPhraseQueryFullText(phraseAnalyzer, >>>>>>>> >>>>>>>> field, "region=3D\"NEW HAMPSHIRE\""), >>>>>>>> BooleanClause.Occur.MUST); >>>>>>>> //booleanQuery.add(Utils.createPhraseQueryFullText(phraseAnalyzer, >>>>>>>> >>>>>>>> field, "country=3D\"UNITED STATES\""), >>>>>>>> BooleanClause.Occur.MUST); >>>>>>>> >>>>>>>> The first set brings also street with Nashua name. >>>>>>>> (NASHUA). >>>>>>>> >>>>>>>> so, to prevent that and since i also indexed with >>>>>>>> street=3D"..." >>>>>>>> city=3D"..." i did the second set but it does not bring >>>>>>>> anything. >>>>>>>> >>>>>>>> createPhraseQuery builds a Phrasequery with one term >>>>>>>> equal to the >>>>>>>> string >>>>>>>> in the call. >>>>>>>> >>>>>>>> Best regards >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 6/10/19 10:47 AM, baris.kazar@oracle.com >>>>>>>> wrote: >>>>>>>> > How do i check how it is indexed? lowecase or uppercase= ? >>>>>>>> > >>>>>>>> > only way is now to by testing. >>>>>>>> > >>>>>>>> > i am using standardanalyzer. >>>>>>>> > >>>>>>>> > Best regards >>>>>>>> > >>>>>>>> > >>>>>>>> > On 6/9/19 11:57 AM, Atri Sharma wrote: >>>>>>>> >> On Sun, Jun 9, 2019 at 8:53 PM Tomoko Uchida >>>>>>>> >> >>>>>>> > wrote: >>>>>>>> >>> Hi, >>>>>>>> >>> >>>>>>>> >>> What analyzer do you use for the text field? Is the >>>>>>>> term "Main" >>>>>>>> >>> correctly indexed? >>>>>>>> >> Agreed. Also, it would be good if you could post your >>>>>>>> actual >>>>>>>> code. >>>>>>>> >> >>>>>>>> >> What analyzer are you using? If you are using >>>>>>>> StandardAnalyzer, >>>>>>>> then >>>>>>>> >> all of your terms while indexing will be lowercased, >>>>>>>> AFAIK, but >>>>>>>> your >>>>>>>> >> query will not be analyzed until you run a >>>>>>>> QueryParser on it. >>>>>>>> >> >>>>>>>> >> >>>>>>>> >> Atri >>>>>>>> >> >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> ------------------------------------------------------------------= --- >>>>>>>> >>>>>>>> >>>>>>>> > 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 >>>>>>>> >>>>>>>> ------------------------------------------------------------------= --- >>>>>>>> >>>>>>>> >>>>>>>> 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 >>>>>>>> >>>>>>>> ------------------------------------------------------------------= --- >>>>>>>> >>>>>>>> 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 >>>>>>> >>>>>> --------------------------------------------------------------------= - >>>>>> 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 >>>>> > --------------------------------------------------------------------- > 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