Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0096C074 for ; Wed, 20 Jun 2012 14:14:08 +0000 (UTC) Received: (qmail 60473 invoked by uid 500); 20 Jun 2012 14:14:07 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 60338 invoked by uid 500); 20 Jun 2012 14:14:07 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 60324 invoked by uid 99); 20 Jun 2012 14:14:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 14:14:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.42] (HELO mail-wg0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 14:13:57 +0000 Received: by wgbds11 with SMTP id ds11so3499055wgb.5 for ; Wed, 20 Jun 2012 07:13:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:x-gm-message-state; bh=fGuUzR4ln4vQCWopyAneIIiIBF3x5Gvb7FE2fc7BiII=; b=c8ts87djNkke5jcnaw3NCEvXxvF88pBnK5XxwKbtsgxfAHi6XH1VlKmmdkjeYwOpD+ qMSiJDLT+HmppcVnSD+S9jju25T3GI1nEliLzbP8VpG0Pa2dRqL8RF7Avyf/FbuRf5jZ 5/0t4zXMI8/+W1Rjq8eYR2G0ShbZ8MAgolglNuSh2skgBYFM354BJonrOnRg19c2GWXj j8z2g9Wnj2Nl6LItN1pQP1AmW47X+Nb699+zWRwTeSx/6lV9dXl02MIRkd2ZtThPNG4n s6TtZb5a1f0e1PbIUSJNNWUXSjr+05SUqNXFQvrQxNUndMOg2Swr8t3dAxLdPMoQf2Sk k1iw== Received: by 10.181.11.137 with SMTP id ei9mr12409855wid.21.1340201616806; Wed, 20 Jun 2012 07:13:36 -0700 (PDT) Received: from [10.10.10.57] (office.chillibean.net. [193.203.81.66]) by mx.google.com with ESMTPS id dg2sm74605772wib.4.2012.06.20.07.13.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jun 2012 07:13:35 -0700 (PDT) Date: Wed, 20 Jun 2012 15:13:34 +0100 From: Rory Franklin To: user@couchdb.apache.org Message-ID: <94C11ABFDF1546739A7FB256F1BEBC21@chillibean.tv> In-Reply-To: <8F779074-E347-4528-B67B-FE760AF7D2BB@apache.org> References: <0A30A158CD7D43E7BAAFD2B93A6B7BB7@chillibean.tv> <09A5FADF-C288-4D70-9369-995106E318ED@apache.org> <8F779074-E347-4528-B67B-FE760AF7D2BB@apache.org> Subject: Re: CouchDB Lucene boost problem X-Mailer: sparrow 1.6.1 (build 1081.52) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4fe1da8e_59adea3d_164d6" X-Gm-Message-State: ALoCoQmJm7VdnuojbsS5Rp+IlcOLwoFe9IdmhEETJPOvVign9Q9YQ1ErW1zvCvbW9dH3hSndHck+ --4fe1da8e_59adea3d_164d6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline The term we are searching for (just a numeric ID) exists in two places depending on the document. Either as an "entry_human_id" which is the ID of that specific document, or within an array of "linked_entry_human_ids" where the document is linked to another document. What we want is the document that matches the ID to the entry_human_id comes above any documents that match the ID in the linked_entry_human_ids (hence the boost on entry_human_id), but this doesn't seem to be happening. Would that be better suited to a query-time boost? If so, is there a specific way to boost a term in the query as I cannot see one in the readme. Rory On Wednesday, 20 June 2012 at 15:07, Robert Newson wrote: > > There's index-time and query-time boosting, perhaps that explains it? > > > On 20 Jun 2012, at 14:35, Rory Franklin wrote: > > > The error is now gone, which is great. Thanks so much for fixing that so quickly! > > > > Looking at the results of the search (with debug on for readability), it doesn't look like the boost is actually getting applied? I have a boost on another field (same name, but without the sort_ prefix) and in the BooleanQuery section of the search result it looks like this: > > > > entry_human_id:1220091,boost=1.0 > > The value in the index is actually 1.5. Is it the case that the boost isn't taking effect or that my query doesn't manually boost that field? > > > > Rory > > > > > > On Wednesday, 20 June 2012 at 13:21, Robert Newson wrote: > > > > > anyway, I fixed it. > > > > > > You'll need to delete the index already built, though, and I'd love to hear back from you when you try it. > > > > > > B. > > > > > > On 20 Jun 2012, at 12:05, Rory Franklin wrote: > > > > > > > Hi, > > > > > > > > We've got a machine with couchdb-lucene 0.9 on it and various machines that use 0.7 and there seems to be a discrepancy between the two versions. > > > > > > > > In one of our indexes we are boosting a particular field so that it comes above others in search results (we are searching for an ID and linked ID's in other documents, but want the document that matches the ID directly to return above the linked documents), and the definition looks like this: > > > > > > > > ret.add(doc.entry_human_id, {'field':'sort_entry_human_id', 'type' : 'int', 'boost' : 1.5}) > > > > > > > > On 0.7 this works absolutely fine, but on 0.9 we are seeing this error: > > > > > > > > 2012-06-20 10:48:04,251 WARN [lia_development] Exiting due to exception. > > > > java.lang.UnsupportedOperationException: You cannot set an index-time boost: norms are omitted for field 'sort_entry_human_id' > > > > at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:85) > > > > at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:276) > > > > at org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:852) > > > > at org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:2167) > > > > at com.github.rnewson.couchdb.lucene.DatabaseIndexer.handleResponse(DatabaseIndexer.java:393) > > > > at com.github.rnewson.couchdb.lucene.DatabaseIndexer.handleResponse(DatabaseIndexer.java:83) > > > > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:735) > > > > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:709) > > > > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:700) > > > > at com.github.rnewson.couchdb.lucene.DatabaseIndexer.run(DatabaseIndexer.java:473) > > > > at java.lang.Thread.run(Thread.java:680) > > > > > > > > > > > > > > > > Removing the boost and restarting couchdb-lucene resolves the issue, I'm just curious as to what the problem may be? > > > > > > > > > > > > > > > > Thanks, > > > > Rory > > > > > > > > > > > > > > > > > --4fe1da8e_59adea3d_164d6--