Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 10934 invoked from network); 16 Apr 2009 12:52:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Apr 2009 12:52:19 -0000 Received: (qmail 98461 invoked by uid 500); 16 Apr 2009 12:52:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 98378 invoked by uid 500); 16 Apr 2009 12:52:16 -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 Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 74969 invoked by uid 99); 16 Apr 2009 12:35:13 -0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) X-TM-IMSS-Message-ID: <91836caf00000c05@kecgate02.infosys.com> From: "Radhalakshmi Sreedharan" To: "java-user@lucene.apache.org" Date: Thu, 16 Apr 2009 18:04:30 +0530 Subject: Need help : SpanNearQuery Thread-Topic: Need help : SpanNearQuery Thread-Index: Acm+iNF1pm27j7zFQguuTqAOr5YfMAABtBKw Message-ID: <5CDA3DC1F80BBB42BD0B48FABC128B5114EC9BFE30@BLRKECMBX09.ad.infosys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_5CDA3DC1F80BBB42BD0B48FABC128B5114EC9BFE30BLRKECMBX09ad_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_5CDA3DC1F80BBB42BD0B48FABC128B5114EC9BFE30BLRKECMBX09ad_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi=20, I=20have=20a=20question=20related=20to=20SpanNearQuery. As=20of=20now,=20the=20=20SpanNearQuery=20has=20the=20constraint=20that= =20all=20the=20terms=20need=20to=20present=20in=20the=20document. Eg=20:=20If=20my=20SpanNearQuery=20terms=20=20are=20(=20ab,bc,cd)=20all= =20of=20them=20need=20to=20be=20found=20within=20a=20span=20of=20"n"=20an= d=20unordered. But=20my=20requirement=20is=20similar=20to=20=20 I=20need=20a=20hit=20even=20if=20there=20are=202/3=20terms=20found=20with= =20the=20span=20being=20applied=20for=20those=202=20terms. Is=20there=20any=20custom=20implementation=20in=20place=20for=20this?=20I= =20checked=20SrndQuery=20but=20that=20also=20doesn't=20work. This=20is=20my=20workaround=20currently: 1)=20=20=20=20=20=20For=20a=20list=20of=20terms=20(=20ab,bc,=20cd,ef)=20,= =20make=20a=20set=20like=20(=20ab,bc)=20,=20(=20bc,cd)=20(=20ab,cd)=20(bc= ,ef)=20(=20ab,bc,cd)=20(=20ab,bc,cd,ef).....=20and=20so=20on. 2)=20=20=20=20=20=20Create=20a=20spanNearQuery=20for=20=20each=20of=20the= se=20terms 3)=20=20=20=20=20=20Add=20it=20to=20the=20booleanQuery=20with=20a=20=20SH= OULD=20clause. However=20this=20approach=20gives=20me=20puzzling=20scores =20eg=20If=20my=20document=20has=20=20only=20(=20ab,bc,cd)=20the=20penalt= y=20for=20the=20missing=20ef=20is=20very=20high=20and=20my=20score=20come= s=20down=20quite=20a=20bit. <=20the=20score=20value=20is=20=20of=20importance=20as=20I=20am=20using= =20it=20further=20down=20the=20line=20for=20other=20calculations> It=20would=20be=20great=20if=20you=20can=20help=20me=20out=20with=20this. Regards, Radha ****************=20CAUTION=20-=20Disclaimer=20***************** This=20e-mail=20contains=20PRIVILEGED=20AND=20CONFIDENTIAL=20INFORMATION= =20intended=20solely=20 for=20the=20use=20of=20the=20addressee(s).=20If=20you=20are=20not=20the= =20intended=20recipient,=20please=20 notify=20the=20sender=20by=20e-mail=20and=20delete=20the=20original=20mes= sage.=20Further,=20you=20are=20not=20 to=20copy,=20disclose,=20or=20distribute=20this=20e-mail=20or=20its=20con= tents=20to=20any=20other=20person=20and=20 any=20such=20actions=20are=20unlawful.=20This=20e-mail=20may=20contain=20= viruses.=20Infosys=20has=20taken=20 every=20reasonable=20precaution=20to=20minimize=20this=20risk,=20but=20is= =20not=20liable=20for=20any=20damage=20 you=20may=20sustain=20as=20a=20result=20of=20any=20virus=20in=20this=20e-= mail.=20You=20should=20carry=20out=20your=20 own=20virus=20checks=20before=20opening=20the=20e-mail=20or=20attachment.= =20Infosys=20reserves=20the=20 right=20to=20monitor=20and=20review=20the=20content=20of=20all=20messages= =20sent=20to=20or=20from=20this=20e-mail=20 address.=20Messages=20sent=20to=20or=20from=20this=20e-mail=20address=20m= ay=20be=20stored=20on=20the=20 Infosys=20e-mail=20system. ***INFOSYS********=20End=20of=20Disclaimer=20********INFOSYS*** --_000_5CDA3DC1F80BBB42BD0B48FABC128B5114EC9BFE30BLRKECMBX09ad_--