You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by search engn dev <sa...@gmail.com> on 2012/04/17 07:06:10 UTC

Difference between two solr indexes

I have two solr indexes , Index A contains 100000 docs and B contains 110000
docs, A is subset of B, i have to perform operation where
A XOR B = result
and delete result.

--
View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-two-solr-indexes-tp3916328p3916328.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Difference between two solr indexes

Posted by search engn dev <sa...@gmail.com>.
Thanks Pawel Rog for much needed reply, i'll give try and let u know.

--
View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-two-solr-indexes-tp3916328p3918996.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Difference between two solr indexes

Posted by Pawel Rog <pa...@gmail.com>.
If there are only 100'000 documents dump all document ids and make diff
If you're using linux based system you can just use simple tools to do it.
Something like that can be helpful

curl "http://your.hostA:port/solr/index/select?*:*&fl=id&wt=csv" > /tmp/idsA
curl "http://your.hostB:port/solr/index/select?*:*&fl=id&wt=csv" > /tmp/idsB
diff /tmp/idsA /tmp/idsB | grep "<\|>" | awk '{print $2;}' | sed
's/\(.*\)/<id>\1<\/id>/g' > /tmp/ids_to_delete.xml

Now you have file. Now you can just add to that file "<delete>" and
"</detele>" and upload that file into solr using curl
curl -X POST -d @/tmp/ids_to_delete.xml "http://your.hostA:port
/solr/index/upadte"

On Tue, Apr 17, 2012 at 2:09 PM, nutchsolruser <nu...@gmail.com>wrote:

> I'm Also seeking solution for similar problem.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Difference-between-two-solr-indexes-tp3916328p3917050.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Difference between two solr indexes

Posted by nutchsolruser <nu...@gmail.com>.
I'm Also seeking solution for similar problem. 

--
View this message in context: http://lucene.472066.n3.nabble.com/Difference-between-two-solr-indexes-tp3916328p3917050.html
Sent from the Solr - User mailing list archive at Nabble.com.