Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 8403 invoked from network); 1 Apr 2011 01:19:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2011 01:19:48 -0000 Received: (qmail 80564 invoked by uid 500); 1 Apr 2011 01:19:46 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 80520 invoked by uid 500); 1 Apr 2011 01:19:46 -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 80512 invoked by uid 99); 1 Apr 2011 01:19:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 01:19:46 +0000 X-ASF-Spam-Status: No, hits=3.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,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 xiongkun04@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 01:19:39 +0000 Received: by iwr19 with SMTP id 19so4376448iwr.35 for ; Thu, 31 Mar 2011 18:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=XTWLLlVaRQWbJFRJerRPSPg7txMO6en+l80aX9XVWQk=; b=MQ44rxP77reHvDlPwyWjxFCnXZeoExJElQpiJraA7lCRtKjslF+1mfYIGuujZinGVe CT079fDivPr0l36fxbomjtZFOJnSWZ52VNzhIrDiGJblvCXuZ0VdIWvf+cEh0cWZ7Xb0 1epf6fIq9Ym7f6w4oVBcBFUd+kk1NqX9FiurA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Chz3y5JoqT5a6Xdtxb3mTiTzPVDwrYLo6riZd4Z6SaHEO970/tztRhmw3mUYzMkXQW /3RCbuX6K7sqiO/6slWktSCJwqdMcbnUbNOqvG0NSFee9bbYvrXAKaSa/ondE7rkcGWu eOIe3wTtqR/QB5sE5+xO4qczTFLn10wUGtiyo= MIME-Version: 1.0 Received: by 10.43.63.10 with SMTP id xc10mr4317015icb.303.1301620758277; Thu, 31 Mar 2011 18:19:18 -0700 (PDT) Received: by 10.42.176.137 with HTTP; Thu, 31 Mar 2011 18:19:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Apr 2011 09:19:14 +0800 Message-ID: Subject: Re: How could I set multi-value for a field in DataImporter From: kun xiong To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=bcaec51b1f21edee1a049fd13263 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51b1f21edee1a049fd13263 Content-Type: text/plain; charset=ISO-8859-1 Stefan, Thanks very much for your quick reply. Actually I have to write a CustomDataImporter class to full-import data and index them all. So it should be done in java code and schema.xml. When I write a CustomDataImporter, I have to implement a nextRow() method, which return a map. And also schema,xml have a multiValued label for each field. I am wondering how could I utilize it. I believe there must be several ways to make it multi-valued, using analyzer or copyField. I am finding a efficient and easiest way that I don't have to change data format. Kun 2011/3/31 Stefan Matheis > Kun, > > it should be enough to use the same field second time, like this: > > value2 > > Regards > Stefan > > On Thu, Mar 31, 2011 at 11:39 AM, kun xiong wrote: > > Since the interface of DataImporter return a Map, I can't put multi value > > for a same field, right? > > > > Example: > > > > I write a class extending DataImporter, and want to index {"value1", > > "value2"} for field "name". > > > > How should I do? > > > > Many thanks. > > > > Kun > > > --bcaec51b1f21edee1a049fd13263--