From solr-user-return-142617-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri Jul 20 17:01:43 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8FBB3180663 for ; Fri, 20 Jul 2018 17:01:42 +0200 (CEST) Received: (qmail 89778 invoked by uid 500); 20 Jul 2018 15:01:40 -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 89766 invoked by uid 99); 20 Jul 2018 15:01:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2018 15:01:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3ACC8C00C7 for ; Fri, 20 Jul 2018 15:01:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=elyograg.org Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id G6sfeRvd_fqM for ; Fri, 20 Jul 2018 15:01:37 +0000 (UTC) Received: from frodo.elyograg.org (frodo.elyograg.org [166.70.79.217]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 80F0D5F30B for ; Fri, 20 Jul 2018 15:01:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id A8F8EBCE for ; Fri, 20 Jul 2018 09:01:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-language:content-transfer-encoding:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=mail; t=1532098888; bh=oRP9FpSKy1mnRCAY+uO59g+1TRX5 r5nMfhonCpnyFgo=; b=rIoVmio6/3fsWT0hLCd+/EdVzDdHjqDVteFagDQrVTEW 3KdBpx++zy/r5GulwkU5i19cRzTFXF7PXllHYppfXU1z7LpWxZZBzRiu0QSnpPUt 9QF3Woi0UYNPu7YJXCviZ0rwDHw9Kuy5diNIDk+ADWhiXHrl3bummvz1BTh7WLo= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aiKWwNFsMVcI for ; Fri, 20 Jul 2018 09:01:28 -0600 (MDT) Received: from [10.2.0.108] (client175.mainstreamdata.com [209.63.42.175]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id A3ADBBC6 for ; Fri, 20 Jul 2018 09:01:26 -0600 (MDT) Subject: Re: Creating a collection in Solr standalone mode using solrj To: solr-user@lucene.apache.org References: From: Shawn Heisey Message-ID: <1b8ec39f-17c7-bab4-a3f4-71c1c5d0bffc@elyograg.org> Date: Fri, 20 Jul 2018 09:01:20 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US On 7/20/2018 12:09 AM, Arunan Sugunakumar wrote: > I would like to know whether it is possible to create a collection in Solr > through SolrJ. I tried to create and it throws me an error saying that > "Solr instance is not running in SolrCloud mode. A "collection" is a SolrCloud concept.  Collections are comprised of one or more shards.  Shards are comprised of one or more replicas.  Each shard replica is a Solr index core.  The Collections API, which is most likely what you are calling in SolrJ when you get that error, only works in SolrCloud mode. Standalone mode only has cores.  They are not called collections. You can use the CoreAdmin API in standalone mode, but be aware of the large warning box here titled "CREATE must be able to find a configuration": https://lucene.apache.org/solr/guide/7_4/coreadmin-api.html Typically, filesystem access is required to create the configuration when running in standalone mode, before the core can be created.  If you want to be able to create indexes completely remotely, that is a whole lot easier if Solr is running in SolrCloud mode. Something that the documentation for the CoreAdmin API doesn't say, but probably should, is that in most usage, instanceDir and dataDir should not be specified.  The instanceDir will default to the same name as the core, and it will live in the solr home.  The dataDir defaults to "./data" relative to the instanceDir, and this is usually the best option.  Changing these is an expert option. Thanks, Shawn