Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 25520 invoked from network); 12 Sep 2009 03:52:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Sep 2009 03:52:45 -0000 Received: (qmail 98774 invoked by uid 500); 12 Sep 2009 03:52:44 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 98683 invoked by uid 500); 12 Sep 2009 03:52:43 -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 98667 invoked by uid 99); 12 Sep 2009 03:52:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Sep 2009 03:52:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shalinmangar@gmail.com designates 74.125.92.26 as permitted sender) Received: from [74.125.92.26] (HELO qw-out-2122.google.com) (74.125.92.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Sep 2009 03:52:36 +0000 Received: by qw-out-2122.google.com with SMTP id 9so579638qwb.53 for ; Fri, 11 Sep 2009 20:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=8MJ4KPnOh/fTQz4Ip9WwhXFIdZfYWi5cyatybnKiLgc=; b=dfKY14+SCcrvc9yNDWecEFgyq2B0MAcPtxJwz4pcoLkHhncgP5OnscgWygxek7SEyW x6qKcFXfeHFIjkvjaiXQLkswUjenR7jWl4M/edk0xLDIkwBGMEAFGxpeHgfLNxWyDQZ/ CcbMa0UH0HspRrMtLbrKyFgINS59QlQ+fxAOA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RC4Wpf8+67OgYDJHCS4ucTCsvabrPSmSWeA0A1LBfTKRv7NaWkIMAE+Yrg9Qq60VeP /6bSoxmAlsPUST+XfYRvoUWPn2xwB8ShkLTDX18L9VtFWMPoYi9nbhWrq9EEXilvNRuX LmeY8RMobX0kZ63KCA8CpfqIXZExq7olOPmtY= MIME-Version: 1.0 Received: by 10.229.28.8 with SMTP id k8mr1462185qcc.78.1252727533637; Fri, 11 Sep 2009 20:52:13 -0700 (PDT) In-Reply-To: <25395746.post@talk.nabble.com> References: <25395746.post@talk.nabble.com> Date: Sat, 12 Sep 2009 09:22:13 +0530 Message-ID: <69de18140909112052p5b1b3a0ehf1881cbf182a3ccd@mail.gmail.com> Subject: Re: Random Display of result in solr From: Shalin Shekhar Mangar To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001636426d3ba492f80473595bd2 X-Virus-Checked: Checked by ClamAV on apache.org --001636426d3ba492f80473595bd2 Content-Type: text/plain; charset=UTF-8 On Fri, Sep 11, 2009 at 12:02 PM, dharhsana wrote: > > I am working on blog module,here the user will be creating more blogs,and > he > can post on it and have several comments for post.For implementing this > module i am using solr 1.4. > > When i get blog details of particular user, it brings the result in random > manner for > (ex:) If i am passing blogid in the query to get my details,the result i > got > as ,if i have 2 result from it > > To filter on a certain value for a field, you should pass field-name:field-value. An example in your case will be userId:1 > This is the first result > > SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] > SolrDocument2{blogId=New Blog, postId=New Post, postTitle=New Post, > postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] > SolrDocument3{blogTitle=ammu blog, blogId=ammu blog, userId=1}] > > The Second result > SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] > SolrDocument2{blogTitle=ammu blog, blogId=ammu blog, userId=1}] > SolrDocument3{blogId=New Blog, postId=New Post, postTitle=New Post, > postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] > > I am using solrj, when i am iterating the list i some times get > ArrayIndexOutOfBoundException,because of my difference in the result. > > When i run again my code some other time ,it produces the proper result.so > the list was changing all time. > Both the results contain the same number of documents (three), isn't it? The list of documents returned by Solrj is never modifed by Solrj so I don't see why you will get that exception. > If anybody faced this type of problem ,please share with me.. > > And iam not able to get the specific thing ie if i am going to get blog > details of particular user, so i will be passing blogtitle for ex: rekha > blog , it is not giving only the rekha blog it also gives other blog which > ends with blog (i..e sandhya blog,it brings even that and shows..). > > You need to define what you want to retrieve. Do you want only exact matches - case sensitive or case insensitive? Do you want full text matches with exact match on top? Do you want to remove a particular word "blog" from your index? Also see http://wiki.apache.org/solr/SolrRelevancyCookbook -- Regards, Shalin Shekhar Mangar. --001636426d3ba492f80473595bd2--