Return-Path: Delivered-To: apmail-incubator-lucene-net-user-archive@minotaur.apache.org Received: (qmail 49153 invoked from network); 31 Oct 2009 08:25:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Oct 2009 08:25:22 -0000 Received: (qmail 89321 invoked by uid 500); 31 Oct 2009 08:25:22 -0000 Delivered-To: apmail-incubator-lucene-net-user-archive@incubator.apache.org Received: (qmail 89185 invoked by uid 500); 31 Oct 2009 08:25:20 -0000 Mailing-List: contact lucene-net-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-user@incubator.apache.org Delivered-To: mailing list lucene-net-user@incubator.apache.org Received: (qmail 89175 invoked by uid 99); 31 Oct 2009 08:25:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Oct 2009 08:25:20 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of digydigy@gmail.com designates 209.85.219.205 as permitted sender) Received: from [209.85.219.205] (HELO mail-ew0-f205.google.com) (209.85.219.205) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Oct 2009 08:25:17 +0000 Received: by ewy1 with SMTP id 1so3399282ewy.27 for ; Sat, 31 Oct 2009 01:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references :in-reply-to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language :x-cr-hashedpuzzle:x-cr-puzzleid; bh=S9js5Gp6qop+Roc5/wiSiJ0ktTJNIYcmoDiNtofArPY=; b=fvrc+XDKBSK7ntRy/44epdHMh7vKf8sC9fIQnXr2U1nTtLwcu8PXhN//HHpc3MTRpb itkvTSx/PC4DijtvAnUCVdfgL7fAF5pTnwHp5vN86jdH68dzMOkBPDSM9et0Y2Zwg5py GV13/H+UiBA19cLABk5h3n33MxkkoPZI2h5OM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :content-language:x-cr-hashedpuzzle:x-cr-puzzleid; b=pXdKgHyk32IeAUBVBAoPFS2dsyBsC6LFyQHjea8GiNebNRpwrsMQkYTuInLkXmc8IO oWTwGg8BimcOTqnbR+xpJA/ycTI9VTYBGN0DqeHsjWFrHXWCf3cErck17aoWDu5T0VqI bANQRShAa7MUwsEUP9msZ7UvLKySMUIVX++kU= Received: by 10.216.87.136 with SMTP id y8mr1371125wee.70.1256977496370; Sat, 31 Oct 2009 01:24:56 -0700 (PDT) Received: from NEWPC ([81.213.206.230]) by mx.google.com with ESMTPS id 23sm10563195eya.12.2009.10.31.01.24.54 (version=SSLv3 cipher=RC4-MD5); Sat, 31 Oct 2009 01:24:55 -0700 (PDT) From: "Digy" To: References: <990757.775.qm@web30508.mail.mud.yahoo.com> <003e01ca59bb$0cc194d0$2644be70$@com> <995064.86824.qm@web30505.mail.mud.yahoo.com> In-Reply-To: <995064.86824.qm@web30505.mail.mud.yahoo.com> Subject: RE: Is it generally a good idea to avoid using QueryParser if you know how to make the Query yourself? Date: Sat, 31 Oct 2009 10:24:27 +0200 Message-ID: <000901ca5a03$917f6f10$b47e4d30$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcpZxNjYGBLuwsAuQ0igcpcqfZiq0AAPeBmA Content-Language: tr x-cr-hashedpuzzle: Cryx C7Bi DKcQ DoPV DuZK D9Pg EEM/ Eq21 ExjB GJU8 ICuh KC7J KHft KK4k KOmJ KZKX;1;bAB1AGMAZQBuAGUALQBuAGUAdAAtAHUAcwBlAHIAQABpAG4AYwB1AGIAYQB0AG8AcgAuAGEAcABhAGMAaABlAC4AbwByAGcA;Sosha1_v1;7;{8C3A0A7E-FE0B-453D-9A9D-6358C1F51BFD};ZABpAGcAeQBkAGkAZwB5AEAAZwBtAGEAaQBsAC4AYwBvAG0A;Sat, 31 Oct 2009 08:24:25 GMT;UgBFADoAIABJAHMAIABpAHQAIABnAGUAbgBlAHIAYQBsAGwAeQAgAGEAIABnAG8AbwBkACAAaQBkAGUAYQAgAHQAbwAgAGEAdgBvAGkAZAAgAHUAcwBpAG4AZwAgAFEAdQBlAHIAeQBQAGEAcgBzAGUAcgAgAGkAZgAgAHkAbwB1ACAAawBuAG8AdwAgAGgAbwB3ACAAdABvACAAbQBhAGsAZQAgAHQAaABlACAAUQB1AGUAcgB5ACAAeQBvAHUAcgBzAGUAbABmAD8A x-cr-puzzleid: {8C3A0A7E-FE0B-453D-9A9D-6358C1F51BFD} I am not sure that I can understand what you exactly want to do but, you can create an analyzer, get the output and then see what you can do with it. StandardAnalyzer analyzer = new StandardAnalyzer(); TokenStream stream = analyzer.TokenStream("", new System.IO.StringReader("your text")); Token token = stream.Next(); while ( token !=null ) { Console.WriteLine(token.TermText()); token = stream.Next(); } DIGY -----Original Message----- From: Ron Grabowski [mailto:rongrabowski@yahoo.com] Sent: Saturday, October 31, 2009 2:55 AM To: lucene-net-user@incubator.apache.org Subject: Re: Is it generally a good idea to avoid using QueryParser if you know how to make the Query yourself? Is there a way to avoid using QueryParser altogether? I don't need all the text parsed, I just want to run the name field through an analyzer and use the output of that along with TermQuerys for the zip and city. I'm wanting to do ~2,500 specific searches on an index with between 26m documents. I know ahead of time what most of my fields will be. I thought I could save some time by not having to separate my fields, making a giant string, then having QueryParser split the string back into terms to search. ----- Original Message ---- From: Digy To: lucene-net-user@incubator.apache.org Sent: Fri, October 30, 2009 7:45:21 PM Subject: RE: Is it generally a good idea to avoid using QueryParser if you know how to make the Query yourself? You can combine queries . (such as your custom "TermQuery" + the result of a "QueryParser.Parse") DIGY -----Original Message----- From: Ron Grabowski [mailto:rongrabowski@yahoo.com] Sent: Saturday, October 31, 2009 1:12 AM To: lucene-net-user@incubator.apache.org Subject: Is it generally a good idea to avoid using QueryParser if you know how to make the Query yourself? I can convert this text into a Query using just TermQuery and BooleanQuery: name:"ACME Produce" AND city:Anytown AND zip:90210 If I create the Query object on my own will I loose all the benefits from things like StandardAnalyzer? Is there a way I can submit an object graph to QueryParser so I can get the benefits of its analyzer without making it parse the raw string? My input is coming from well defined areas; its not free form where the user can enter anything they want. Can I use a StandardAnalyzer myself then take its output and create the appropriate Query objects then join all of them into a BooleanQuery? I'm using /tags/Lucene.Net_2_4_0.