Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 19031 invoked from network); 15 Dec 2010 15:29:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 15:29:35 -0000 Received: (qmail 58980 invoked by uid 500); 15 Dec 2010 15:29:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58680 invoked by uid 500); 15 Dec 2010 15:29:29 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 58660 invoked by uid 99); 15 Dec 2010 15:29:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 15:29:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chardex@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 15:29:20 +0000 Received: by qwh6 with SMTP id 6so2090653qwh.35 for ; Wed, 15 Dec 2010 07:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=xNHU/DFUmYUrunsOC3yqQ42Qdf6okcmWgXSllbcZV1U=; b=pz7Dvzwa9UmMI8cEJ1+BMyBAuACEIes37sJoOOP0EDK20Z9FFafv1J3IsVeqokQV7W kMAKQzTJ4W9MlA6VuURnlNelDbmPlp4V7IsgwbFnQI07y6jnMZKBBil781HhAd8nfK5l v8ZTjDs/XRkNvmNxMqoWb4jlPexKGqYU9OyV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YSSkzDPL7ejCZND5swPWGnh2b/MExbMvUtq3Jxk5E5h/KYDnirl6yxnGVpaq1a127/ 3/lVSD8O90SazqXAY1Ux8yV4eTzVNu4jf0y/S2vXqJtK3kf+KtFs2QG5MH+E4X8rlUz3 Z+cIjYHwM+Qh/0ccu1xQlksnpqWq0wJZAudHw= MIME-Version: 1.0 Received: by 10.229.91.194 with SMTP id o2mr623341qcm.138.1292426940031; Wed, 15 Dec 2010 07:29:00 -0800 (PST) Received: by 10.229.35.8 with HTTP; Wed, 15 Dec 2010 07:28:59 -0800 (PST) Date: Wed, 15 Dec 2010 18:28:59 +0300 Message-ID: Subject: Custom scoring for searhing geographic objects From: Pavel Minchenkov To: solr-user@lucene.apache.org, java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016364ee640a8a4dc0497749827 X-Virus-Checked: Checked by ClamAV on apache.org --0016364ee640a8a4dc0497749827 Content-Type: text/plain; charset=ISO-8859-1 Hi, Please give me advise how to create custom scoring. I need to result that documents were in order, depending on how popular each term in the document (popular = how many times it appears in the index) and length of the document (less terms - higher in search results). For example, index contains following data: ID | SEARCH_FIELD ------------------------------ 1 | Russia 2 | Russia, Moscow 3 | Russia, Volgograd 4 | Russia, Ivanovo 5 | Russia, Ivanovo, Altayskaya street 45 6 | Russia, Moscow, Kremlin 7 | Russia, Moscow, Altayskaya street 8 | Russia, Moscow, Altayskaya street 15 9 | Russia, Moscow, Altayskaya street 15/26 And I should get next results: Query | Document result set ---------------------------------------------- Russia | 1,2,4,3,6,7,8,9,5 Moscow | 2,6,7,8,9 Ivanovo | 4,5 Altayskaya | 7,8,9,5 In fact --- it is a search for geographic objects (cities, streets, houses). At the same time can be given only part of the address, and the results should appear the most relevant results. Thanks. -- Pavel Minchenkov --0016364ee640a8a4dc0497749827--