Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 44778 invoked from network); 2 Aug 2010 21:23:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 21:23:11 -0000 Received: (qmail 43512 invoked by uid 500); 2 Aug 2010 21:23:09 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 43476 invoked by uid 500); 2 Aug 2010 21:23:09 -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 43468 invoked by uid 99); 2 Aug 2010 21:23:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 21:23:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 21:23:01 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id BC60171CF1D; Mon, 2 Aug 2010 14:22:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id 994F271CF1A for ; Mon, 2 Aug 2010 14:22:40 -0700 (PDT) Date: Mon, 2 Aug 2010 14:22:40 -0700 (PDT) From: Chris Hostetter To: "solr-user@lucene.apache.org" Subject: Re: StatsComponent and sint? In-Reply-To: <90FF863A96E1EC42B8B240D04C88FB1D1337895E8C@JHEMTEXVS2.win.ad.jhu.edu> Message-ID: References: <90FF863A96E1EC42B8B240D04C88FB1D1337895E8C@JHEMTEXVS2.win.ad.jhu.edu> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : With an sint, it seems to have trouble if there are any documents with : null values for the field. It appears to decide that a null/empty/blank : value is -1325166535, and is thus the minimum value. 1) there is relaly no such thing as a "null" value for a field ... there are documents that have no value for that field -- but that's differnet then actually indexing a null value (Solr is not a RDBMS) I attempted to reproduce the problem you are describing by chaning the solr 1.4.1 schema.xml so that the "popularity" field used type "sint" and then indexed all of the sample documents. exactly one of those documents has no value for hte "popularity" field (id:UTF8TEST) and this is the results that i got from the following reuqest... http://localhost:8983/solr/select/?wt=json&q=*%3A*%0D%0A&version=2.2&start=0&rows=00&indent=on&stats=true&stats.field=popularity { "responseHeader":{ "status":0, "QTime":1, "params":{ "indent":"on", "start":"0", "q":"*:*\r\n", "stats":"true", "stats.field":"popularity", "wt":"json", "version":"2.2", "rows":"00"}}, "response":{"numFound":19,"start":0,"docs":[] }, "stats":{ "stats_fields":{ "popularity":{ "min":0.0, "max":10.0, "sum":102.0, "count":18, "missing":1, "sumOfSquares":702.0, "mean":5.666666666666667, "stddev":2.700762419587999}}}} As you can see, it correclty recognized that the "min" value was 0.0, and thta 1 of the 19 total docs had no value for that field. If you can't reproduce these types of results with your own data, then we need to see a lot more details about your specific sitaution (schema.xml, raw data, query urls, results, etc...) to try and understand what you are seeing. -Hoss