From solr-user-return-36637-apmail-lucene-solr-user-archive=lucene.apache.org@lucene.apache.org Thu May 27 23:14:17 2010 Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 72415 invoked from network); 27 May 2010 23:14:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 May 2010 23:14:17 -0000 Received: (qmail 61980 invoked by uid 500); 27 May 2010 23:14:15 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 61941 invoked by uid 500); 27 May 2010 23:14:15 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 61929 invoked by uid 99); 27 May 2010 23:14:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 23:14:14 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of efriwp@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 23:14:10 +0000 Received: by mail-fx0-f48.google.com with SMTP id 12so569298fxm.35 for ; Thu, 27 May 2010 16:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=ArhcnCXMa3lbyk2l7GyIKVPtaAZodeP+otpGu4Nup4A=; b=N/hwBZxe6trSD/wZsBGF5OrGn2r7IBRNil9kxh9Yv9VVCxU58kKgO+HpBkEqGQIfAl GcSGGkcYlbi2gEnG5OY14/BOqzSdRzHT44tbqlUM8BBFVTrAKP19L3VA5eaT7/4fRJQc y+6C4g2Ep4TktZnKxWBLKpdsVzMa2glB0kN0A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=vuKPUby+B0LWqQx+LDIX5DYHqcKLzCsS5u/WMsCnLQikvp0FjLnwyiLZUNCjHFbK2x c0qBJPqFH9h2F0qjfmjGEMmU4vFDZZlEQqFxRemba0Q5WtbesxJRsW80mqlQkF2HJT8X 4NSAdg/kg7UJRGO133mIimAL5HUC7AeUiB4ys= Received: by 10.239.167.16 with SMTP id d16mr982113hbe.118.1275002029130; Thu, 27 May 2010 16:13:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.164.137 with HTTP; Thu, 27 May 2010 16:13:29 -0700 (PDT) In-Reply-To: <87553.94895.qm@web52902.mail.re2.yahoo.com> References: <87553.94895.qm@web52902.mail.re2.yahoo.com> From: "efriwp@gmail.com" Date: Thu, 27 May 2010 19:13:29 -0400 Message-ID: Subject: Re: Does SOLR Allow q= (A or B) AND (C or D)? To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001485f270ce08c30f04879b8b5f --001485f270ce08c30f04879b8b5f Content-Type: text/plain; charset=ISO-8859-1 Hi Ahmet, Thanks for the response again. The best way I could illustrate our live search feature is an example implementation: http://www.krop.com/ Notice when you search the word "senior" in the keywords field, the results filter down to just the job postings with that word in it. So it's not the same as an "autocomplete" type feature where as the user types in the search input box, their input is completed. We are just focusing on providing results with each key stroke. If the user types "Ca", we will return anything with "Cat" in it. Thus we need the wildcard. As of now we send a query to solr of "Ca*". However, solr can struggle with wildcards where it won't return a match on a word if there is a wildcard at the end of a fully-typed word. You have to leave off the last letter of that word and an asterisk to match it. We're attempting to do an "OR" search of the "term OR term*" anytime a user enters a term. Our need mix these "or" searches with an AND command is because if a user types two words, we are requiring both words be in the result to have a match. Your suggestion as how to do this worked beautifully, except for the fact that it didn't seem to be able to find wildcarded terms when indeed it should have. thanks Brad On Thu, May 27, 2010 at 6:57 PM, Ahmet Arslan wrote: > > Thank you. That seems to be working > > well, except when I included a wild card > > for any of the terms, the wildcard term isn't being found > > out. > > > > My searches are actually: > > q=+(A A*) +(C C*)&q.op=OR > > > > When I do a regular search on "A*" or "C*" I get matches > > but not in the > > context of the above query. The ability to use wildcards > > seems to get lost. > > > > This is all for the purposes of a "live search" in which we > > return matches > > as the user types, thus the wildcard. A and C > > represent two different terms > > a user has typed in the search box (where we are providing > > the live-search > > results). > > Looks like you are looking for auto-suggest/complete feature. As the user > types something there will be ajax suggestions right? > > Queries A* or C* are not sorted by score/relevance. Can you explain in > more detail what do you mean by "search on "A*" or "C*" I get matches > but not in the context of the above query" > > > > > --001485f270ce08c30f04879b8b5f--