Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 59590 invoked from network); 10 Apr 2008 13:24:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Apr 2008 13:24:59 -0000 Received: (qmail 23227 invoked by uid 500); 10 Apr 2008 13:24:52 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 23201 invoked by uid 500); 10 Apr 2008 13:24:52 -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 23189 invoked by uid 99); 10 Apr 2008 13:24:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2008 06:24:52 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chose77@gmail.com designates 209.85.132.247 as permitted sender) Received: from [209.85.132.247] (HELO an-out-0708.google.com) (209.85.132.247) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2008 13:24:01 +0000 Received: by an-out-0708.google.com with SMTP id c5so822962anc.49 for ; Thu, 10 Apr 2008 06:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=TYsiuXoLDmWxgiKUlE5LA0Qlxwm2sANnEhgiHTF+Bgk=; b=wk6kjvn4FXM3ErrnmaDbrqjk+AkSBWw/CfTW/B+/Mpwiy8feCVbpgDH6qdN0gQgCxNTOXa6839BB7b4DdZCFrQQfFwmj1r4aNQC8/0ub93bL4dbslpiUBdBrmtA8StNSi/OPWVgsi1fyAkBf+oE+SsBzIZ1KOQIvPNnTKyzrfok= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=XFfo7eZle7eu2Zg4mZy8/te3m4MgtSfZKJPydVGX1d9t7Za4lIdGuJn7z9uHyYqmvBpjZNWt7cx4ElOyX/Ly/jeEAi6qoPdLtV7FqNRYE0AyMlFFjFw+z5e5xfu5Vhyqo+g09HDq4N7J7eAbHDDl7Xid64/QXZqty9ChE6RgmDI= Received: by 10.100.166.9 with SMTP id o9mr2778341ane.91.1207833861479; Thu, 10 Apr 2008 06:24:21 -0700 (PDT) Received: by 10.100.42.11 with HTTP; Thu, 10 Apr 2008 06:24:21 -0700 (PDT) Message-ID: Date: Thu, 10 Apr 2008 15:24:21 +0200 From: "Joe K" To: java-user@lucene.apache.org Subject: Re: WildCardQuery and TooManyClauses In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1594_31266106.1207833861478" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1594_31266106.1207833861478 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Donna, thanks for the reply! I didn't try yet, but you are probably right that this should work for me. The filter parameter and the fact that TopDocs doesn't have the getter to the scoreDocs were confusing to me. Thanks a lot, Chose On Thu, Apr 10, 2008 at 3:02 PM, Donna L Gresh wrote: > Doesn't the following do what you want with maxnumhits =200? > TopDocs td; > td = indexSearcher.search(query, filter, maxnumhits); > where filter can be null > > > > Donna L. Gresh > Services Research, Mathematical Sciences Department > IBM T.J. Watson Research Center > (914) 945-2472 > http://www.research.ibm.com/people/g/donnagresh > gresh@us.ibm.com > > > "Joe K" wrote on 04/10/2008 08:53:06 AM: > > > Hello everybody, > > I know there was written a tons of words about this issue, but I'm just > not > > clear enough about it. > > > > I have these facts: > > > > 1. my query is always 1 letter and *, eg. M* > > 2. i always want to get max 200 results, no more! > > 3. i don't want to fix this issue by setting maxClauseCount > > > > I just don't see the easy way how to get my results, did i missed > something? > > > > From what I've read here I know that probably i should play with filters > or > > with WildCardEnum, but why? > > I just want to get simple this: > > SELECT FROM XXX WHERE XXX.name LIKE 'M%' LIMIT 200; > > > > (there is no filtering in this query except the wildcard itself) > > > > Please, what is the easiest solution to achieve this? > > > > Thanks in advance, > > Chose > ------=_Part_1594_31266106.1207833861478--