Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 19068 invoked from network); 12 Feb 2002 15:11:13 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Feb 2002 15:11:13 -0000 Received: (qmail 26930 invoked by uid 97); 12 Feb 2002 15:11:12 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 26914 invoked by uid 97); 12 Feb 2002 15:11:11 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 26903 invoked from network); 12 Feb 2002 15:11:11 -0000 Message-Id: <5.0.2.1.0.20020212101007.01b17498@166.108.1.236> X-Sender: charvey@166.108.1.236 X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Tue, 12 Feb 2002 10:10:57 -0800 To: "Lucene Users List" From: Charles Harvey Subject: Re: Search all words of a query In-Reply-To: <0ff101c1b3d6$fd37a460$0102000a@cardiweb.com> References: <3C691BD7.E68EE8FE@india.adventnet.com> <00be01c1b3cf$a8e051c0$1668a8c0@oxymel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Isn't it standard that if the user wants all words to match they will use the AND keyword? (Lucene supports this) If you want all words to match all of the time, why not just split the query with a StringTokenizer and put it back together with the + ? That should only be five or ten lines of code... Or, of course, you could add a checkbox for the user that was labeled 'match all words' and do the above only in the condition of that box being checked.. At 04:07 PM 2/12/2002 +0100, you wrote: >Hi all. > >On a form, users may enter words. I must search with thoses words. >What I actually do is creating a Query with QueryParser using my analyzer. >But this make a search that match if one word match. > >I know that if I wan't all words to match, I must add a '+' before each >word. >I'd like to not be obliged to do this and I don't want to ask the user to >make this. > >Does any one see on witch parameter I can play to do this ? > >I don't think it's in the analyser (I already tried ! instead, I never had >any result). >No, It's in the QueryParser but I'm not sure I can do anything. > >If sombody have the answer (positive or negative), It would be helpfull. > >Thanks in advance. > >Mike > > > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: _________________ "The trouble with the rat-race is that even if you win you're still a rat." --Lily Tomlin _________________ Charles Harvey Developer http://www.philly.com Wk: 215 789 6057 Cell: 215 588 0851 -- To unsubscribe, e-mail: For additional commands, e-mail: