Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0BD2D200C1C for ; Wed, 15 Feb 2017 12:46:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0A864160B5E; Wed, 15 Feb 2017 11:46:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C2FE0160B46 for ; Wed, 15 Feb 2017 12:46:04 +0100 (CET) Received: (qmail 34056 invoked by uid 500); 15 Feb 2017 11:46:03 -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 34037 invoked by uid 99); 15 Feb 2017 11:46:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 11:46:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4A1F41A005F for ; Wed, 15 Feb 2017 11:46:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.48 X-Spam-Level: X-Spam-Status: No, score=0.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=sematext-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 85VHJK8dTF5j for ; Wed, 15 Feb 2017 11:46:00 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DDC475FE22 for ; Wed, 15 Feb 2017 11:45:59 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id v186so39788375wmd.0 for ; Wed, 15 Feb 2017 03:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sematext-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=/d1CU3jT/ZrOjlWsYq88lxn5q4XpTjwM8ogymoiTtbQ=; b=Nh86/OBnH9lhuFy2TaL/ta6tgeNFSb028lW82bF41zApOkkb2+PRYch08ABTSAp2cI 8OOV7zH30ZMXDongqzxNMTaZdI6rj8FsddCTN28a5jN7uEKLi3lFI2fnooBcsX4FsEJ2 87PlMgjlWhITho7lcfera45g2espeZdr0c5NmNfmtZMO4tsIO+Fx+EAx1na+mWys+g4Q tN4F1VDrD+nBSseH7389w8fFZclUwTg9tWfxMQLm/g+Agxiwn/+2WdVgGfflxbxwV8gn YAF9NoEqcrEhRR4tz/KgTCaMjnJ5+zWR32R9hrgaPoU45tj9in9+atGHAM1DzNroXeF6 W5MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=/d1CU3jT/ZrOjlWsYq88lxn5q4XpTjwM8ogymoiTtbQ=; b=BwJLVeOoAIUdXaYsBOgRs6LE/P6l6q8qNtuS6VvKlMbys1RjRRrwlcmot3U7KaU45N RuHI78CGDvmlqvpX6RTylf1gjPXF6FGnU5kI9aGCeSVGC/Qi/7I7F+McFLnfP5gWbYY8 RcZL5vtW3ZMgD9relRh/HSqGIhRBgaFAtdqt/Pun3VGtH7N7dOve/c1GsWHqbNuF/TPp PLqzi0bNHAz5wLOaug1goOhoIpqVIKh2mFo8jjy3dKTSOVG+X7hS3zSBfPPF8x9On73A MQKf3tbtxnHZbVHKwHhdSGeNmGWOhyl2AydXif2LqsfWiEwUa68PdMpbEYylDjKhR1oj RoMw== X-Gm-Message-State: AMke39kgXw1tjuXEyqbr0zvLAgqlsAX4CEAHrB0ENpsH6KwYIyaxFDcIxjSfBvj9qxX7yg== X-Received: by 10.28.178.16 with SMTP id b16mr8119130wmf.83.1487159158617; Wed, 15 Feb 2017 03:45:58 -0800 (PST) Received: from [192.168.43.32] ([212.39.104.135]) by smtp.gmail.com with ESMTPSA id f6sm4527460wrf.61.2017.02.15.03.45.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2017 03:45:57 -0800 (PST) Subject: Re: Indexing of documents in more than one step (SOLRJ) To: solr-user@lucene.apache.org References: <633b4029-f5c8-8535-e161-f264a6b37a29@man.poznan.pl> From: Emir Arnautovic Message-ID: Date: Wed, 15 Feb 2017 12:45:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Wed, 15 Feb 2017 11:46:06 -0000 Which version of Solr do you use? Is it always the same field? Again, without checking anything, see if it could be that field is not multivalue and your value is. In any case, this is inefficient way of indexing. If possible, stream both sources ordered by ID and merge them in one input doc and send to Solr. Emir On 15.02.2017 12:24, Maciej Ł. PCSS wrote: > No, it's not the case. In both steps I'm indexing documents from the > same set of IDs (I mean the values of the 'id'). > > Maciej > > > W dniu 15.02.2017 o 11:07, Emir Arnautovic pisze: >> I did not have time to test it or look at the code, but can you check >> if it could be the case when there is no document with a, b, c fields >> and you are trying to update it with d, e, f using partial update >> syntax. >> >> Emir >> >> >> On 15.02.2017 09:25, Maciej Ł. PCSS wrote: >>> Dear All, >>> how should I handle the following scenario using SOLRJ? Index a >>> collection of documents (fill fields a, b, c). Then index the same >>> collection but this time fill fields d, e, f. >>> >>> In a pseudo-code it would be: step1(collectionX); >>> step2(collectionX); solrCommit(); >>> >>> See my observations below: >>> - first step is done by calling >>> SolrInputDocument.addField(fieldName, value); and this works fine. >>> - if I do the same for the second step then all fields in my >>> documents get removed; >>> - for that reason I need to call >>> SolrInputDocument.addField(fieldName, >>> Collections.singletonMap("set", value)); and then it's fine >>> - but for some field, if I do the call from above, then the indexed >>> values are like "{set=value}" instead of just "value". >>> >>> Can somebody explain this strange behaviour to me? >>> >>> Regards >>> Maciej >>> >> > -- Monitoring * Alerting * Anomaly Detection * Centralized Log Management Solr & Elasticsearch Support * http://sematext.com/