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 9E694C031 for ; Wed, 20 Jun 2012 14:07:28 +0000 (UTC) Received: (qmail 39463 invoked by uid 500); 20 Jun 2012 14:07:27 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 39428 invoked by uid 500); 20 Jun 2012 14:07:27 -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 39420 invoked by uid 99); 20 Jun 2012 14:07:26 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 14:07:26 +0000 Received: from localhost (HELO [192.168.1.5]) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 14:07:26 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: CouchDB Lucene boost problem From: Robert Newson In-Reply-To: Date: Wed, 20 Jun 2012 15:07:23 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <8F779074-E347-4528-B67B-FE760AF7D2BB@apache.org> References: <0A30A158CD7D43E7BAAFD2B93A6B7BB7@chillibean.tv> <09A5FADF-C288-4D70-9369-995106E318ED@apache.org> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1278) 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! >=20 > 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: >=20 > entry_human_id:1220091,boost=3D1.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? >=20 > Rory >=20 >=20 > On Wednesday, 20 June 2012 at 13:21, Robert Newson wrote: >=20 >> anyway, I fixed it.=20 >>=20 >> You'll need to delete the index already built, though, and I'd love = to hear back from you when you try it. >>=20 >> B. >>=20 >> On 20 Jun 2012, at 12:05, Rory Franklin wrote: >>=20 >>> Hi, >>>=20 >>> 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. >>>=20 >>> 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: >>>=20 >>> ret.add(doc.entry_human_id, {'field':'sort_entry_human_id', 'type' : = 'int', 'boost' : 1.5}) >>>=20 >>> On 0.7 this works absolutely fine, but on 0.9 we are seeing this = error: >>>=20 >>> 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(DocInverterPerFi= eld.java:85) >>> at = org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFiel= dProcessorPerThread.java:276) >>> at = org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.ja= va:852) >>> at = org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:2167)= >>> at = com.github.rnewson.couchdb.lucene.DatabaseIndexer.handleResponse(DatabaseI= ndexer.java:393) >>> at = com.github.rnewson.couchdb.lucene.DatabaseIndexer.handleResponse(DatabaseI= ndexer.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) >>>=20 >>>=20 >>>=20 >>> Removing the boost and restarting couchdb-lucene resolves the issue, = I'm just curious as to what the problem may be? >>>=20 >>>=20 >>>=20 >>> Thanks, >>> Rory >>>=20 >>=20 >>=20 >>=20 >=20 >=20