Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F94F11BAA for ; Tue, 15 Apr 2014 20:33:33 +0000 (UTC) Received: (qmail 13202 invoked by uid 500); 15 Apr 2014 20:33:28 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 13108 invoked by uid 500); 15 Apr 2014 20:33:28 -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 13096 invoked by uid 99); 15 Apr 2014 20:33:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 20:33:28 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [89.161.223.23] (HELO v044473.home.net.pl) (89.161.223.23) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 15 Apr 2014 20:33:23 +0000 Received: from 078088014112.bialystok.vectranet.pl [78.88.14.112] (HELO ragnar) by alud.home.pl [89.161.223.23] with SMTP (IdeaSmtpServer v0.80) id 3440848e070dedca; Tue, 15 Apr 2014 22:32:59 +0200 Date: Tue, 15 Apr 2014 22:32:55 +0200 From: =?utf-8?Q?Rafa=C5=82_Ku=C4=87?= Organization: Solr.pl X-Priority: 3 (Normal) Message-ID: <106757529.20140415223255@alud.com.pl> To: solr-user@lucene.apache.org Subject: Re: Transformation on a numeric field In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hello! You can achieve that using update processor, for example look here: http://= wiki.apache.org/solr/ScriptUpdateProcessor What you would have to do, in general, is create a script that would take a value of the field, divide it by the 1000 and put it in another field - the target numeric field. --=20 Regards, Rafa=C5=82 Ku=C4=87 Performance Monitoring * Log Analytics * Search Analytics Solr & Elasticsearch Support * http://sematext.com/ > Hi All, > I am looking for a way to index a numeric field and its value > divided by 1 000 into another numeric field. > I thought about using a CopyField with a > PatternReplaceFilterFactory to keep only the first few digits (cutting th= e last three). > Solr complains that I can not have an analysis chain on a numeric field: > Core: > org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: > Plugin init failure for [schema.xml] fieldType "truncated_salary": > FieldType: TrieIntField (truncated_salary) does not support > specifying an analyzer. Schema file is > /data/solr/solr-no-cloud/Core1/schema.xml > Is there a way to accomplish this ? > Thanks