Re: Migrate Legacy Solr Cores to SolrCloud

2020-12-05 Thread Erick Erickson
First thing I’d do is run one of the examples to insure you have Zookeeper set 
up etc. You can create a collection that uses the default configset.

Once that’s done, start with ‘SOLR_HOME/solr/bin/solr zk upconfig’. There’s 
extensive help if you just type “bin/solr zk -help”. You give it the path to an 
existing config directory and a name for the configset in Zookeeper.

Once that’s done, you can create the collection, the admin UI drop-down will 
allow you to choose the configset. Now you have a collection.

To put data in that collection, it would be best to index the data again. If 
you can’t do that, you MUST have created the collection with exactly one shard, 
replicationFactor=1 (leader-only). Shut down Solr and copy your core’s data 
directory (the parent of the index directory) to “the right place”. You’ll 
overwrite an existing data directory with a name like 
collection1_shard1_replica_n1/data. Do _not_ copy the entire core directory up, 
_just_ recursively copy the “data” dir.

Now power Solr back up and you should be good. You can use the collections API 
ADDREPLICA command to build out your collection for HA/DR.

NOTE: if by “existing” you mean an index created with Solr X-2 (i.e. Solr 6 or 
earlier and assuming you’re migrating to Solr 8) this will not work and you’ll 
have to re-index your data. This is not particular to SolrCloud, Lucene will 
refuse to open the index if it was created with any version of Solr earlier 
than the immediately prior major Solr release, i.e. if the index was _created_ 
with Solr 7, you can do the above if you’re moving to Solr 8. If you’re 
migrating to Solr 7, then if the old index was created with Solr 6 you’ll be 
ok….

Best,
Erick

> On Dec 4, 2020, at 3:07 PM, Jay Mandal  
> wrote:
> 
> Hello All,
> Please can some one from the Solr Lucene Community Provide me the Steps on 
> how to migrate an existing Solr legacy Core, data and conf(manage 
> schema,solrconfig.xml files to SolrCloud configuration with collections and 
> shards and where to copy the existing files to reuse the data in the solr 
> knowledgebase.
> Thanks,
> Jayanta.
> 
> Regards,
> 
> Jayanta Mandal
> 4500 S Lakeshore Dr #620, Tempe, AZ 85282
> +1.602-900-1791 ext. 10134|Direct: +1.718-316-0384
> www.anjusoftware.com
> 
> 
> 
> 
> 
> Confidentiality Notice
> 
> This email message, including any attachments, is for the sole use of the 
> intended recipient and may contain confidential and privileged information. 
> Any unauthorized view, use, disclosure or distribution is prohibited. If you 
> are not the intended recipient, please contact the sender by reply email and 
> destroy all copies of the original message. Anju Software, Inc. 4500 S. 
> Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.



Migrate Legacy Solr Cores to SolrCloud

2020-12-05 Thread Jay Mandal
Hello All,
Please can some one from the Solr Lucene Community Provide me the Steps on how 
to migrate an existing Solr legacy Core, data and conf(manage 
schema,solrconfig.xml files to SolrCloud configuration with collections and 
shards and where to copy the existing files to reuse the data in the solr 
knowledgebase.
Thanks,
Jayanta.

Regards,

Jayanta Mandal
4500 S Lakeshore Dr #620, Tempe, AZ 85282
+1.602-900-1791 ext. 10134|Direct: +1.718-316-0384
www.anjusoftware.com





Confidentiality Notice

This email message, including any attachments, is for the sole use of the 
intended recipient and may contain confidential and privileged information. Any 
unauthorized view, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply email and 
destroy all copies of the original message. Anju Software, Inc. 4500 S. 
Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.


Re: What's the most efficient way to check if there are any matches for a query?

2020-12-05 Thread Erick Erickson
Have you looked at the Term Query Parser (_not_ the TermS Query Parser)
or Raw Query Parser? 

https://lucene.apache.org/solr/guide/8_4/other-parsers.html

NOTE: these perform _no_ analysis, so you have to give them the exact term...

These are pretty low level, and if they’re “fast enough” you won’t have to do
any work. You could do some Lucene-level coding I suspect to improve that,
depends on whether you think those are fast enough…

Best,
Erick


> On Dec 5, 2020, at 5:04 AM, Colvin Cowie  wrote:
> 
> Hello,
> 
> I was just wondering. If I don't care about the number of matches for a
> query, let alone what the matches are, just that there is *at least 1*
> match for a query, what's the most efficient way to execute that query (on
> the /select handler)? (Using Solr 8.7)
> 
> As a general approach for a query is "rows=0=id asc" the best I can
> do? Is there a more aggressive short circuit that will stop a searcher as
> soon as it finds a match?
> 
> For a specific case where the query is for a single exact term in an
> indexed field (with or without doc values) is there a different answer?
> 
> Thanks for any suggestions



What's the most efficient way to check if there are any matches for a query?

2020-12-05 Thread Colvin Cowie
Hello,

I was just wondering. If I don't care about the number of matches for a
query, let alone what the matches are, just that there is *at least 1*
match for a query, what's the most efficient way to execute that query (on
the /select handler)? (Using Solr 8.7)

As a general approach for a query is "rows=0=id asc" the best I can
do? Is there a more aggressive short circuit that will stop a searcher as
soon as it finds a match?

For a specific case where the query is for a single exact term in an
indexed field (with or without doc values) is there a different answer?

Thanks for any suggestions