Re: Copying data

2020-03-17 Thread Jayadevan Maymala
On Mon, Mar 16, 2020 at 5:53 PM Erick Erickson 
wrote:

> It’s not at all clear what the problem is. If you have a single-shard
> collection, just
> 1> create the stand-alone core
> 2> shut down the Solr instance
> 3> replace the stand-alone core's data dir with one from any of your prod
> machines.
> 4> start Solr
>

I did not know that just copying the data directory will work. Will try
that. Thanks.


Re: How to sum model grouped?

2020-03-17 Thread Paras Lehana
Hey,

Check this once:
https://lucene.apache.org/solr/guide/8_4/the-stats-component.html

On Mon, 16 Mar 2020 at 18:08, hakan  wrote:

> I use solr version 7.1. I have as grouped model in total 11M record, as
> below
> example.
> This question is, How do I sum fromfollowers field from this grouped model?
> {
>  groupValue: "1927245294",
>  doclist: {
> numFound: 1,
> start: 0,
> docs: [
> {
>fromuserid: "1927245294",
>fromfollowers: 185
>  }
>  ]
>   }
> },
> {
>  groupValue: "98405321",
>  doclist: {
> numFound: 1,
> start: 0,
> docs: [
> {
>fromuserid: "98405321",
>fromfollowers: 292
>  }
>  ]
>   }
> },
> {
>  groupValue: "182496421",
>  doclist: {
> numFound: 1,
> start: 0,
> docs: [
> {
>fromuserid: "182496421",
>fromfollowers: 111
>  }
>  ]
>   }
> }
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
-- 
Regards,

*Paras Lehana* [65871]
Development Engineer, *Auto-Suggest*,
IndiaMART InterMESH Ltd,

11th Floor, Tower 2, Assotech Business Cresterra,
Plot No. 22, Sector 135, Noida, Uttar Pradesh, India 201305

Mob.: +91-9560911996
Work: 0120-4056700 | Extn:
*1196*

-- 
*
*

 


Re: How do *you* restrict access to Solr?

2020-03-17 Thread Jan Høydahl
You can consider upgrading to Solr 8.5 which is to be released in a couple of 
days, which makes it easy to whitelist IP addresses in solr.in.sh:

# Allow IPv4/IPv6 localhost, the 192.168.0.x IPv4 network, and 2000:123:4:5:: 
IPv6 network.
SOLR_IP_WHITELIST="127.0.0.1, [::1], 192.168.0.0/24, [2000:123:4:5::]/64"

https://lucene.apache.org/solr/guide/8_5/securing-solr.html#enable-ip-access-control

But please please do not expose Solr, even if secured, to untrusted networks 
and never to the public internet.

Jan

> 16. mar. 2020 kl. 16:46 skrev Ryan W :
> 
> On Mon, Mar 16, 2020 at 10:51 AM Susheel Kumar 
> wrote:
> 
>> Basic auth should help you to start
>> 
>> https://lucene.apache.org/solr/guide/8_1/basic-authentication-plugin.html
> 
> 
> 
> Thanks.  I think I will give up on the plugin system.  I haven't been able
> to get the plugin system to work, and it creates too many opportunities for
> human error.  Even if I can get it working this week, what about 6 months
> from now or a year from now when something goes wrong and I have to debug
> it.  It seems like far too much overhead to provide the desired security
> benefit, except perhaps in situations where an organization has Solr
> specialists who can maintain the system.



Re: number of documents exceed 2147483519

2020-03-17 Thread Hongxu Ma
I was trying "SPLITSHARD" in my test env and encountered a strange behavior:
I created a 1M doc collection and it contained 8 shards, then split shard1, 
after split:

  *   SPLITSHARD returned success.
  *   looks good
 *   shard1 (became inactive) -> shard1_0 and shard1_1
 *   range 8000-9fff -> 8000-8fff and 9000-9fff
  *   but
 *   the doc number is increasing: docnum of shard1_0 (70702) + docnum of 
shard1_1(67980) > docnum of shard1(124818)

I tested many times and this issue happened every time. Why?

Thanks.









From: Hongxu Ma 
Sent: Monday, March 16, 2020 16:46
To: solr-user@lucene.apache.org 
Subject: number of documents exceed 2147483519

Hi
I'm using solr-cloud (ver 6.6), got an error:
org.apache.solr.common.SolrException: Exception writing document id (null) to 
the index; possible analysis error: number of documents in the index cannot 
exceed 2147483519

After googled it, I know the number is exceed one solr shard limit.
The collection has 64 shards, so I think total limit is 20B*64=128B

My question is:
I don't want to recreate index (then split to more shards) and also don't want 
to delete docs.
Can I using the "SPLITSHARD" api to fix this issue?
https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-splitshard

After split each shard (now 128 shards), I think the total limit is increasing 
to 256B, right?

Thanks.


Collections API | Apache Solr Reference Guide 
6.6
The Collections API is used to enable you to create, remove, or reload 
collections, but in the context of SolrCloud you can also use it to create 
collections with a specific number of shards and replicas.
lucene.apache.org