[ 
https://issues.apache.org/jira/browse/SOLR-4040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497256#comment-13497256
 ] 

Darin Plutchok commented on SOLR-4040:
--------------------------------------

Yonik, below is how I created the cloud configuration shown above (it mostly 
relies of solr.xml). Hope this helps. 

Configure solr.xml as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<!--
 http://wiki.apache.org/solr/CoreAdmin
-->
<solr persistent="false">
  <cores adminPath="/admin/cores" shareSchema="true"  hostPort="8893">
    <core name="otherdocs_shard0" shard="slice0" collection="otherdocs" 
instanceDir="." 
dataDir="/Users/darin/apache-solr-4.0.0/example/solr/data/otherdocs_shard0" />
<core name="patents_shard0" shard="slice0" collection="patents" instanceDir="." 
dataDir="/Users/darin/apache-solr-4.0.0/example/solr/data/patents_shard0" />
<core name="patents_shard1" shard="slice1" collection="patents" instanceDir="." 
dataDir="/Users/darin/apache-solr-4.0.0/example/solr/data/patents_shard1" />
<core name="patents_shard2" shard="slice2" collection="patents" instanceDir="." 
dataDir="/Users/darin/apache-solr-4.0.0/example/solr/data/patents_shard2" />
  </cores>
</solr>

Run this command:

java -Xmx4000m -Xms2000m -Djetty.port=8893 
-Dbootstrap_confdir=/Users/darin/apache-solr-4.0.0/example/solr/conf 
-Dcollection.configName=patentsConfigs -DzkRun -jar start.jar &

Note: that the I also altered the default solr dir structure a bit. I deleted 
the default 'collection' dir and moved its conf dir up a level so that it 
resides directly under the 'Solr' directory (as is evident in the above 
command).

Let me know if I can provide any further info.  
                
> SolrCloud deleteByQuery requires multiple commits
> -------------------------------------------------
>
>                 Key: SOLR-4040
>                 URL: https://issues.apache.org/jira/browse/SOLR-4040
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 4.0
>         Environment: OSX
>            Reporter: Darin Plutchok
>              Labels: SolrCloud, commit, delete
>             Fix For: 4.0
>
>
> I am using embedded zookeeper and my cloud layout is show below (all actions 
> are done on the "patents' collection only).
> First commit/delete works for a single shard only, dropping query results by 
> about a third. Second commit/delete drops query results to zero.
> http://127.0.0.1:8893/solr/patents/update?commit=true&stream.body=<delete><query>dogs</query></delete>
> http://localhost:8893/solr/patents/select?q=dogs&rows=0 (results drop by a 
> third)
> http://127.0.0.1:8893/solr/patents/update?commit=true&stream.body=<delete><query>dogs</query></delete>
> http://localhost:8893/solr/patents/select?q=dogs&rows=0 (results drop to zero)
> Note that a delete without a commit followed by a commit drops query results 
> to zero, as it should:
> http://127.0.0.1:8893/solr/patents/update/?stream.body=<delete><query>dogs</query></delete>
> http://localhost:8893/solr/patents/select?q=dogs&rows=0 (full count as no 
> commit yet)
> http://127.0.0.1:8893/solr/patents/update/?commit=true
> http://localhost:8893/solr/patents/select?q=dogs&rows=0   (results drop to 
> zero)
> One workaround (produces zero hits in one shot):
> http://127.0.0.1:8893/solr/patents/update?commit=true&stream.body=<outer><delete><query>sun</query></delete><commit/></outer>
> The workaround I am using for now (produces zero hits in one shot):
> http://127.0.0.1:8893/solr/patents/update?stream.body=<outer><delete><query>knee</query></delete><commit/><commit/></outer>
> {code}
> {
>   
> "otherdocs":{"slice0":{"replicas":{"Darins-MacBook-Pro.local:8893_solr_otherdocs_shard0":{
>           "shard":"slice0",
>           "roles":null,
>           "state":"active",
>           "core":"otherdocs_shard0",
>           "collection":"otherdocs",
>           "node_name":"Darins-MacBook-Pro.local:8893_solr",
>           "base_url":"http://Darins-MacBook-Pro.local:8893/solr";,
>           "leader":"true"}}}},
>   "patents":{
>     
> "slice0":{"replicas":{"Darins-MacBook-Pro.local:8893_solr_patents_shard0":{
>           "shard":"slice0",
>           "roles":null,
>           "state":"active",
>           "core":"patents_shard0",
>           "collection":"patents",
>           "node_name":"Darins-MacBook-Pro.local:8893_solr",
>           "base_url":"http://Darins-MacBook-Pro.local:8893/solr";,
>           "leader":"true"}}},
>     
> "slice1":{"replicas":{"Darins-MacBook-Pro.local:8893_solr_patents_shard1":{
>           "shard":"slice1",
>           "roles":null,
>           "state":"active",
>           "core":"patents_shard1",
>           "collection":"patents",
>           "node_name":"Darins-MacBook-Pro.local:8893_solr",
>           "base_url":"http://Darins-MacBook-Pro.local:8893/solr";,
>           "leader":"true"}}},
>     
> "slice2":{"replicas":{"Darins-MacBook-Pro.local:8893_solr_patents_shard2":{
>           "shard":"slice2",
>           "roles":null,
>           "state":"active",
>           "core":"patents_shard2",
>           "collection":"patents",
>           "node_name":"Darins-MacBook-Pro.local:8893_solr",
>           "base_url":"http://Darins-MacBook-Pro.local:8893/solr";,
>           "leader":"true"}}}}}
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to