Return-Path: Delivered-To: apmail-lucene-solr-user-archive@locus.apache.org Received: (qmail 71997 invoked from network); 7 Jun 2006 14:13:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2006 14:13:38 -0000 Received: (qmail 16323 invoked by uid 500); 7 Jun 2006 14:13:37 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 16299 invoked by uid 500); 7 Jun 2006 14:13:37 -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 16290 invoked by uid 99); 7 Jun 2006 14:13:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 07:13:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 07:13:36 -0700 Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1FnymY-0006SL-S7 for solr-user@lucene.apache.org; Wed, 07 Jun 2006 07:13:16 -0700 Message-ID: <4751981.post@talk.nabble.com> Date: Wed, 7 Jun 2006 07:13:14 -0700 (PDT) From: Fabio Confalonieri To: solr-user@lucene.apache.org Subject: Re: Finding documents with undefined field In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: fabio@zero.it X-Nabble-From: Fabio Confalonieri References: <4736565.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thank You Hoss (You all are always very responsive...), actually I've developed my own FacetRequestHandler extending the query format and adding a showfacet parameter (it's a little custom on our needs, but I'd like to publish it when we have finished). What I do is the merge of some ideas from the forum; my query is now in three parts q=query;sort;filters where filters is a list of query-clauses separated by commas that I parse to get filterField and filterValue, then for every filter: filterList.add(QueryParsing.parseQuery(createQueryString("filterField:filterValue", defaultField, req.getSchema())); then I use filterList in the main query in DocListAndSet results = req.getSearcher().getDocListAndSet(query,filterList,sort,... Then, if requested with showfacets parameter, I get facets extracting and parsing a facetXML descriptor from a facet-type document in the index, querying for the facet descriptor of the current category i get from the filter list (similar to CNET, i think). To calculate counts for every facet composed of a field and a value, based on the main query, I use facetCount = searcher.numDocs(QueryParsing.parseQuery("facetField:facetValue", "", req.getSchema()), results.docSet); Now, how could I get a fiter for the missing field ? Can I use the unbounded range trick simply adding a facet (and filter) like this: facetCount = searcher.numDocs(QueryParsing.parseQuery("-fieldName:[* TO *]", "", req.getSchema()), results.docSet); ...since i use results.docSet of the base query (the same for filters I think) ? Or there is a better way ? Thank You again Fabio -- View this message in context: http://www.nabble.com/Finding-documents-with-undefined-field-t1742872.html#a4751981 Sent from the Solr - User forum at Nabble.com.