Graph/Stream requestHandlers in standalone

2018-08-13 Thread David '-1' Schmid
Hello!

I'm interested in using the graph traversal streaming expressions.
My solr instance is running in standalone (not SolrCloud) mode, so I'm
missing the "Stream" interface on the admin pages. The request handler
is there (I guess because it's implicit), but no UI.

Is the streaming something that's only useful with -cloud? I could not
find any information about it.

I expected the graph requestHandler to work as well, but it defaults
to a NullPointerException.
When I'm using the stream interface with the first example from the
guide, I get:

org.apache.solr.common.SolrException:
java.lang.IllegalArgumentException: A HostProvider may not be empty!

Which leads me to believe, that this is only possible with -cloud?
I could not find anything about it, could anybody point out what I'm
missing here?

regards,
David


Re: SolrJ: build a SolrClient(-connection) with HttpClientUtil

2018-08-13 Thread Shawn Heisey

On 8/13/2018 12:39 PM, Clemens Wyss DEV wrote:

What is the proposed way to get/build a SolrClient(-connection) via 
HttpClientUtil
- respecting a given connection and response (socket) timeout (ROP_SO_TIMEOUT, 
PROP_CONNECTION_TIMEOUT)
- making reuse of underlying http client (pooling?)
- what else makes sense (such as PROP_ALLOW_COMPRESSION, PROP_USE_RETRY, ... )


Here's a basic way to create HttpSolrClient, using 7.4 API:

  String baseUrl = "http://solr.example.com:8983/solr;;
  SolrClient sc = null;
  Builder sb = new HttpSolrClient.Builder(baseUrl);
  sb.withSocketTimeout(6);
  sb.withConnectionTimeout(5000);
  sb.allowCompression(true);
  sc = sb.build();

Note that the builder methods are fluent.  Which means the last six 
lines of what I wrote above can be replaced with one statement:


  SolrClient sc = new HttpSolrClient.Builder(baseUrl)
  .withSocketTimeout(6).withConnectionTimeout(5000)
  .allowCompression(true).build();

The more verbose code style is easier to debug, but won't make any 
actual difference in program operation.


If you want to, you can also create a CloseableHttpClient object using 
whatever methods you prefer and assign that to the Builder using 
sb.withHttpClient(client) instead of all the other methods I used.


If you're trying to create a CloudSolrClient object rather than 
HttpSolrClient, there is a similar Builder available for that.


Thanks,
Shawn



Re: Docvalue v.s. invert index

2018-08-13 Thread Shawn Heisey

On 8/13/2018 12:02 AM, Zahra Aminolroaya wrote:

Thanks Erick, Shawn and Tomoko for complete answers.
  
If I set both docvalue and indexed "true" in a field, will Solr understand

to use which technique for faceting or searching? Or Is there any way to
inform Solr to use which technique?


Solr will check the schema and the index to see what's available, and 
use the best option it can find for whatever it's trying to do.  As far 
as I know, Solr doesn't offer any direct ways to force a particular data 
structure for a given operation. There might be some *indirect* ways for 
some things that I'm not aware of.


Thanks,
Shawn



Re: Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Shawn Heisey

On 8/13/2018 8:56 AM, Wendy2 wrote:

Hi Solr users:I encountered the following error when indexing MongoDB data by
using Solr DataImportHandler:org.apache.solr.common.SolrException:
TransactionLog doesn't know how to serialize class org.bson.types.ObjectId;
try implementing ObjectResolver?


The basic problem is that the JDBC driver for MongoDB is returning this 
java object type for one of your fields:


org.bson.types.ObjectId

Solr has absolutely no idea what to do with that object, so it's 
complaining about it instead of silent;u failing to handle the field.  
Your DIH config probably includes SQL statements.  You might be able to 
modify the SELECT to return a type that Solr *does* know how to handle.  
You would need to discuss that with somebody who knows MongoDB's JDBC 
driver inside and out.


Your follow-up message indicates that you may have modified some source 
code to handle that object type, which would be the other solution I can 
think of.  You didn't indicate what code you were changing.  If you're 
satisfied with your solution, awesome.


Thanks,
Shawn



Re: Schema Change for Solr 7.4

2018-08-13 Thread Jan Høydahl
Aliases are like pointers to collections that can be used in-place anywhere 
you'd use the collection name.
See https://lucene.apache.org/solr/guide/7_4/collections-api.html#createalias 


--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 13. aug. 2018 kl. 16:46 skrev THADC :
> 
> Hi Shawn, thanks for this response. We are probably going to take your
> suggested approach:
> 
> 1. Upload a new configset to ZooKeeper. 
> 2. Create a new collection using the new configset. 
> 3. Index data into the new collection. 
> 4. Set up an alias with the original collection name, pointing at the 
> new collection. 
> 5. When you're sure it's good, delete the old collection. 
> 
> I have a question about step 4. What is the actual mechanism for the
> aliasing? Is the alias something that would be defined in the schema.xml
> file, or are you speaking more generally about something that would be
> crafted in our application code or even like a sym link at the operating
> system level?
> 
> Thanks, Tim
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html



Re: SOLR 7.x stable version

2018-08-13 Thread Jan Høydahl
Getting the latest release is almost always the best ting to do, unless it is a 
7.x.0 release fresh out the gate.
As soon as a few weeks has passed without a bugfix release being announced, 
that normally means it is solid :)
Which means that 7.4.0 should be your go-to version right now.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 13. aug. 2018 kl. 15:07 skrev abhi Abhishek :
> 
> Hi All -
> I am using SOLR Cloud v6.5.0 and looking to upgrade it to SOLR 7.x;
> any suggestions which are the most stable version in SOLR 7.x series.
> from my initial reading, I see until SOLR 7.2 we had issues with CDCR
> updates.
> 
> Thank you for your suggestions.
> 
> Thanks,
> Abhishek



Re: Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Wendy2
Update:

I resolved this issue by checking key:value to convert ObjectId to String: 

if(value instanceof ObjectId) {
   map.put(key, (String) value.toString());
} else {
  ..
}
   

A Solr happy user :-)



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


RE: Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Kelly Rusk
I have solved the issue. We found out that the certificate we were provided had 
a special character in it. The keystore did not like the special character. 
Once I imported the .p12 to the Windows Server, I exported a pfx from it with a 
password that had no special characters.

After importing to the keystore via this command, all worked:

keytool -importkeystore -srckeystore C:\rs-pkgs\my.pfx -srcstoretype pkcs12 
-destkeystore S:\Solr\solr-6.6.2\server\etc\solr-ssl.keystore.jks 
-deststoretype JKS

Kelly



-Original Message-
From: Kelly Rusk  
Sent: Monday, August 13, 2018 12:38 PM
To: solr-user@lucene.apache.org
Subject: RE: Add Wildcard Certificate to Java Keystore

Hi Chris,

All I have is the .p12 and password so it has already gone through the CSR 
process. How do I import this file into the keystore? On the Windows side, does 
it need to reside in the Personal Store or Trusted Root Store?

Kelly


-Original Message-
From: Christopher Schultz 
Sent: Monday, August 13, 2018 12:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Add Wildcard Certificate to Java Keystore

Kelly,

On 8/13/18 11:55 AM, Kelly Rusk wrote:
> I have imported a Wildcard Certificate to my Java Keystore and it 
> displays, but when I pull up Internet Explorer and browse to my Solr 
> site, it fails to load and presents TLS errors.

What do you mean "it displays"?

How did you import your signed certificate into your keystore? What was in the 
keystore before you performed the import?

> Has anyone run into this, what commands do you run to import a Public 
> CA into Solr?

Generally, you want to generate a key+cert/CSR and send the CSR to a CA.
The CA signs it and returns it, typically with one or more intermediate 
certificates to build a chain of trust between the CA's root cert (present in 
browser trust stores) and your server's certificate (which was signed by a 
subordinate certificate, not directly by the CA's root cert).

Import them into your keystore in this order:

1. Highest (closest to the root) CA cert 2. [any other intermediate certs from 
the CA, in order] 3. Your server's cert

Most server software needs a bounce to reload the keystore.

-chris



Re: SolrJ: build a SolrClient(-connection) with HttpClientUtil

2018-08-13 Thread ☼ R Nair
Or HttpSolrClient.builder as well

On Mon, Aug 13, 2018, 2:50 PM ☼ R Nair  wrote:

> Pls use CloudSolrClient.builder(...).withHttpClient(...).
> Best, Ravion
>
> On Mon, Aug 13, 2018, 2:40 PM Clemens Wyss DEV 
> wrote:
>
>> What is the proposed way to get/build a SolrClient(-connection) via
>> HttpClientUtil
>> - respecting a given connection and response (socket) timeout
>> (ROP_SO_TIMEOUT, PROP_CONNECTION_TIMEOUT)
>> - making reuse of underlying http client (pooling?)
>> - what else makes sense (such as PROP_ALLOW_COMPRESSION, PROP_USE_RETRY,
>> ... )
>>
>> Up till now (Solr 6.6.0) a ll I did was:
>> solrClient = new HttpSolrClient( coreUrl );
>> ((HttpSolrClient)solrClient).setSoTimeout( forUpdating ?
>> updateSocketTimeout : querySocketTimeout );
>>
>> Thx
>> Clemens
>>
>


Re: SolrJ: build a SolrClient(-connection) with HttpClientUtil

2018-08-13 Thread ☼ R Nair
Pls use CloudSolrClient.builder(...).withHttpClient(...).
Best, Ravion

On Mon, Aug 13, 2018, 2:40 PM Clemens Wyss DEV  wrote:

> What is the proposed way to get/build a SolrClient(-connection) via
> HttpClientUtil
> - respecting a given connection and response (socket) timeout
> (ROP_SO_TIMEOUT, PROP_CONNECTION_TIMEOUT)
> - making reuse of underlying http client (pooling?)
> - what else makes sense (such as PROP_ALLOW_COMPRESSION, PROP_USE_RETRY,
> ... )
>
> Up till now (Solr 6.6.0) a ll I did was:
> solrClient = new HttpSolrClient( coreUrl );
> ((HttpSolrClient)solrClient).setSoTimeout( forUpdating ?
> updateSocketTimeout : querySocketTimeout );
>
> Thx
> Clemens
>


SolrJ: build a SolrClient(-connection) with HttpClientUtil

2018-08-13 Thread Clemens Wyss DEV
What is the proposed way to get/build a SolrClient(-connection) via 
HttpClientUtil
- respecting a given connection and response (socket) timeout (ROP_SO_TIMEOUT, 
PROP_CONNECTION_TIMEOUT)
- making reuse of underlying http client (pooling?)
- what else makes sense (such as PROP_ALLOW_COMPRESSION, PROP_USE_RETRY, ... )

Up till now (Solr 6.6.0) a ll I did was:
solrClient = new HttpSolrClient( coreUrl );
((HttpSolrClient)solrClient).setSoTimeout( forUpdating ? updateSocketTimeout : 
querySocketTimeout );

Thx
Clemens


RE: Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Kelly Rusk
Hi Chris,

Thanks for the assistance. It is from a real CA. I was sent the .p12 Wildcard 
certificate and I need to use that to HTTPS my Solr address.

Kelly 


-Original Message-
From: Christopher Schultz  
Sent: Monday, August 13, 2018 12:59 PM
To: solr-user@lucene.apache.org
Subject: Re: Add Wildcard Certificate to Java Keystore

Kelly,

On 8/13/18 12:37 PM, Kelly Rusk wrote:
> All I have is the .p12 and password so it has already gone through the 
> CSR process. How do I import this file into the keystore?
Java's keytool won't merge keystores. You'll have to export the certificates 
from the PKCS12 file you got from your CA and import each of them separately 
into your own keystore.

> On the Windows side, does it need to reside in the Personal Store or 
> Trusted Root Store?
Umm... is this for a server certificate? If so, you definitely don't want to 
import any of those certificates into any system-wide or user-wide certificate 
trust stores.

Is this certificate signed by a real CA, or are you building your own, 
internal, private CA who is signing these certficates?

-chris

> -Original Message- From: Christopher Schultz 
>  Sent: Monday, August 13, 2018 12:00 PM 
> To: solr-user@lucene.apache.org Subject: Re: Add Wildcard Certificate 
> to Java Keystore
> 
> Kelly,
> 
> On 8/13/18 11:55 AM, Kelly Rusk wrote:
>> I have imported a Wildcard Certificate to my Java Keystore and it 
>> displays, but when I pull up Internet Explorer and browse to my Solr 
>> site, it fails to load and presents TLS errors.
> 
> What do you mean "it displays"?
> 
> How did you import your signed certificate into your keystore? What 
> was in the keystore before you performed the import?
> 
>> Has anyone run into this, what commands do you run to import a Public 
>> CA into Solr?
> 
> Generally, you want to generate a key+cert/CSR and send the CSR to a 
> CA. The CA signs it and returns it, typically with one or more 
> intermediate certificates to build a chain of trust between the CA's 
> root cert (present in browser trust stores) and your server's 
> certificate (which was signed by a subordinate certificate, not 
> directly by the CA's root cert).
> 
> Import them into your keystore in this order:
> 
> 1. Highest (closest to the root) CA cert 2. [any other intermediate 
> certs from the CA, in order] 3. Your server's cert
> 
> Most server software needs a bounce to reload the keystore.
> 
> -chris
> 



Re: Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Christopher Schultz
Kelly,

On 8/13/18 12:37 PM, Kelly Rusk wrote:
> All I have is the .p12 and password so it has already gone through 
> the CSR process. How do I import this file into the keystore?
Java's keytool won't merge keystores. You'll have to export the
certificates from the PKCS12 file you got from your CA and import each
of them separately into your own keystore.

> On the Windows side, does it need to reside in the Personal Store or
> Trusted Root Store?
Umm... is this for a server certificate? If so, you definitely don't
want to import any of those certificates into any system-wide or
user-wide certificate trust stores.

Is this certificate signed by a real CA, or are you building your own,
internal, private CA who is signing these certficates?

-chris

> -Original Message- From: Christopher Schultz
>  Sent: Monday, August 13, 2018 12:00
> PM To: solr-user@lucene.apache.org Subject: Re: Add Wildcard
> Certificate to Java Keystore
> 
> Kelly,
> 
> On 8/13/18 11:55 AM, Kelly Rusk wrote:
>> I have imported a Wildcard Certificate to my Java Keystore and it 
>> displays, but when I pull up Internet Explorer and browse to my
>> Solr site, it fails to load and presents TLS errors.
> 
> What do you mean "it displays"?
> 
> How did you import your signed certificate into your keystore? What
> was in the keystore before you performed the import?
> 
>> Has anyone run into this, what commands do you run to import a
>> Public CA into Solr?
> 
> Generally, you want to generate a key+cert/CSR and send the CSR to a
> CA. The CA signs it and returns it, typically with one or more
> intermediate certificates to build a chain of trust between the CA's
> root cert (present in browser trust stores) and your server's
> certificate (which was signed by a subordinate certificate, not
> directly by the CA's root cert).
> 
> Import them into your keystore in this order:
> 
> 1. Highest (closest to the root) CA cert 2. [any other intermediate
> certs from the CA, in order] 3. Your server's cert
> 
> Most server software needs a bounce to reload the keystore.
> 
> -chris
> 



signature.asc
Description: OpenPGP digital signature


RE: Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Kelly Rusk
Hi Chris,

All I have is the .p12 and password so it has already gone through the CSR 
process. How do I import this file into the keystore? On the Windows side, does 
it need to reside in the Personal Store or Trusted Root Store?

Kelly


-Original Message-
From: Christopher Schultz  
Sent: Monday, August 13, 2018 12:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Add Wildcard Certificate to Java Keystore

Kelly,

On 8/13/18 11:55 AM, Kelly Rusk wrote:
> I have imported a Wildcard Certificate to my Java Keystore and it 
> displays, but when I pull up Internet Explorer and browse to my Solr 
> site, it fails to load and presents TLS errors.

What do you mean "it displays"?

How did you import your signed certificate into your keystore? What was in the 
keystore before you performed the import?

> Has anyone run into this, what commands do you run to import a Public 
> CA into Solr?

Generally, you want to generate a key+cert/CSR and send the CSR to a CA.
The CA signs it and returns it, typically with one or more intermediate 
certificates to build a chain of trust between the CA's root cert (present in 
browser trust stores) and your server's certificate (which was signed by a 
subordinate certificate, not directly by the CA's root cert).

Import them into your keystore in this order:

1. Highest (closest to the root) CA cert 2. [any other intermediate certs from 
the CA, in order] 3. Your server's cert

Most server software needs a bounce to reload the keystore.

-chris



Re: Calculating maxShardsPerNode

2018-08-13 Thread Greenhorn Techie
Thanks Erick!


On 13 August 2018 at 17:05:57, Erick Erickson (erickerick...@gmail.com)
wrote:

I wouldn't spend a lot of time worrying about this, just set it to a
big number ;).

Solr won't create that many replicas (and the name is a bit confusing)
unless you ask it to. It'll also distribute the replicas across nodes
rather than putting them all together, and in the worst case you can
place them individually yourself.

This is more a safety valve to keep from doing ridiculous things, like
telling Solr to create 1,000 replicas on 2 hosts or something.

Best,
Erick

On Mon, Aug 13, 2018 at 8:37 AM, Greenhorn Techie
 wrote:
> Hi,
>
> Our cluster is a 20 node with numShards expected to be set to 10 and
> replication expected to be 4. Wondering what is the best value to
> set maxShardsPerNode to? Should I consider only numShards while
calculating
> the value i.e. because I have only 10 shards, should I set
maxShardsPerNode
> to 1or at number of physical replicas i.e. numShards * replicationFactor.
> So should I set maxShardsPerNode to 2 because the total physical replicas
> are 40 (numShards * replicationFactor) while the number of nodes are only
> 20?
>
> Please let me know your thoughts.
>
> Thanks


Re: SolrCloud CDCR issue

2018-08-13 Thread cdatta
And I was thinking about this one:
https://issues.apache.org/jira/browse/SOLR-11959.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Docvalue v.s. invert index

2018-08-13 Thread Erick Erickson
"My expectation is that scanning Doc Values might be faster than inverted
index if a query matches more than %25 of documents."

I seriously doubt it. Or my expectations are really off base, which is
always possible, I confess I've never measured though. At a high
level:

indexed:
find entry for term_im_searching_for, read the list of IDs it
satisfies immediately

DocValues
if (doc1.val.equals(term_im_searching_for)) { add it to the list }

And if there was more than one clause you'd be scanning the DocValues
for each term.

It'd be interesting to actually measure though.

Erick

On Mon, Aug 13, 2018 at 1:24 AM, Mikhail Khludnev  wrote:
> https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/schema/FieldType.java#L881
>
> https://github.com/apache/lucene-solr/blob/17eb8cd14d27d2680fe7c4b3871f3eb883542d34/solr/core/src/java/org/apache/solr/search/facet/FacetField.java#L106
>
>
> On Mon, Aug 13, 2018 at 9:02 AM Zahra Aminolroaya 
> wrote:
>
>> Thanks Erick, Shawn and Tomoko for complete answers.
>>
>> If I set both docvalue and indexed "true" in a field, will Solr understand
>> to use which technique for faceting or searching? Or Is there any way to
>> inform Solr to use which technique?
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>
>
> --
> Sincerely yours
> Mikhail Khludnev


Re: Calculating maxShardsPerNode

2018-08-13 Thread Erick Erickson
I wouldn't spend a lot of time worrying about this, just set it to a
big number ;).

Solr won't create that many replicas (and the name is a bit confusing)
unless you ask it to. It'll also distribute the replicas across nodes
rather than putting them all together, and in the worst case you can
place them individually yourself.

This is more a safety valve to keep from doing ridiculous things, like
telling Solr to create 1,000 replicas on 2 hosts or something.

Best,
Erick

On Mon, Aug 13, 2018 at 8:37 AM, Greenhorn Techie
 wrote:
> Hi,
>
> Our cluster is a 20 node with numShards expected to be set to 10 and
> replication expected to be 4. Wondering what is the best value to
> set maxShardsPerNode to? Should I consider only numShards while calculating
> the value i.e. because I have only 10 shards, should I set maxShardsPerNode
> to 1or at number of physical replicas i.e. numShards * replicationFactor.
> So should I set maxShardsPerNode to 2 because the total physical replicas
> are 40 (numShards * replicationFactor) while the number of nodes are only
> 20?
>
> Please let me know your thoughts.
>
> Thanks


Re: Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Christopher Schultz
Kelly,

On 8/13/18 11:55 AM, Kelly Rusk wrote:
> I have imported a Wildcard Certificate to my Java Keystore and it
> displays, but when I pull up Internet Explorer and browse to my Solr
> site, it fails to load and presents TLS errors.

What do you mean "it displays"?

How did you import your signed certificate into your keystore? What was
in the keystore before you performed the import?

> Has anyone run into this, what commands do you run to import a Public
> CA into Solr?

Generally, you want to generate a key+cert/CSR and send the CSR to a CA.
The CA signs it and returns it, typically with one or more intermediate
certificates to build a chain of trust between the CA's root cert
(present in browser trust stores) and your server's certificate (which
was signed by a subordinate certificate, not directly by the CA's root
cert).

Import them into your keystore in this order:

1. Highest (closest to the root) CA cert
2. [any other intermediate certs from the CA, in order]
3. Your server's cert

Most server software needs a bounce to reload the keystore.

-chris



signature.asc
Description: OpenPGP digital signature


Add Wildcard Certificate to Java Keystore

2018-08-13 Thread Kelly Rusk
Hi all,

I have imported a Wildcard Certificate to my Java Keystore and it displays, but 
when I pull up Internet Explorer and browse to my Solr site, it fails to load 
and presents TLS errors.

Has anyone run into this, what commands do you run to import a Public CA into 
Solr?

Regards,

Kelly


Calculating maxShardsPerNode

2018-08-13 Thread Greenhorn Techie
Hi,

Our cluster is a 20 node with numShards expected to be set to 10 and
replication expected to be 4. Wondering what is the best value to
set maxShardsPerNode to? Should I consider only numShards while calculating
the value i.e. because I have only 10 shards, should I set maxShardsPerNode
to 1or at number of physical replicas i.e. numShards * replicationFactor.
So should I set maxShardsPerNode to 2 because the total physical replicas
are 40 (numShards * replicationFactor) while the number of nodes are only
20?

Please let me know your thoughts.

Thanks


Re: Highlighting is not working with docValues only String field

2018-08-13 Thread Karthik Ramachandran
I have opened JIRA https://issues.apache.org/jira/browse/SOLR-12663


On Sat, Aug 11, 2018 at 8:59 PM Erick Erickson 
wrote:

> I can see why it wouldn't and also why it could/should. I also wonder about
> SortableTextField, perhaps mention that too.
>
> Seems worth a JIRA to me if there isn't one already
>
> On Fri, Aug 10, 2018, 19:49 Karthik Ramachandran <
> kramachand...@commvault.com> wrote:
>
> > We are using Solr 7.2.1, highlighting is not working with docValues only
> > String field.
> >
> > Should I open a JIRA for this?
> >
> > Schema:
> > 
> >   id
> >   
> >> required="true"/>
> >> stored="true"/>
> >> stored="false"/>
> >   
> > 
> >
> > Data:
> > [{"id":1,"name":"Testing line 1"},{"id":2,"name":"Testing line
> > 2"},{"id":3,"name":"Testing line 3"}]
> >
> > Query:
> >
> >
> http://localhost:8983/solr/test/select?q=Testing*=name=true=name,name1
> >
> > Response:
> > {"response":{"numFound":3,"start":0,"docs":[{"id":"1","name":"Testing
> line
> > 1","name1":"Testing line 1"},{"id":"2","name":"Testing line
> > 2","name1":"Testing line 2"},{"id":"3","name":"Testing line
> > 3","name1":"Testing line 3"}]},"highlighting":{"1":{"name":["Testing
> > line 1"]},"2":{"name":["Testing line
> > 2"]},"3":{"name":["Testing line 3"]}}}
> >
> >
> > With Thanks & Regards
> > Karthik Ramachandran
> > P Please don't print this e-mail unless you really need to
> >
> > ***Legal Disclaimer***
> > "This communication may contain confidential and privileged material for
> > the
> > sole use of the intended recipient. Any unauthorized review, use or
> > distribution
> > by others is strictly prohibited. If you have received the message by
> > mistake,
> > please advise the sender by reply email and delete the message. Thank
> you."
> > **
> >
>


-- 
With Thanks & Regards
Karthik Ramachandran

P Please don't print this e-mail unless you really need to


Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Wendy2
Hi Solr users:I encountered the following error when indexing MongoDB data by
using Solr DataImportHandler:org.apache.solr.common.SolrException:
TransactionLog doesn't know how to serialize class org.bson.types.ObjectId;
try implementing ObjectResolver?Is there any fix or workaround for this
issue? I am using solr 7.3.1 and mongoDB 3.6.5.   ===Here is the source
code===https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/update/TransactionLog.java//
write a BytesRef as a byte array  static final JavaBinCodec.ObjectResolver
resolver = new JavaBinCodec.ObjectResolver() {@Overridepublic Object
resolve(Object o, JavaBinCodec codec) throws IOException {  if (o
instanceof BytesRef) {BytesRef br = (BytesRef)o;   
codec.writeByteArray(br.bytes, br.offset, br.length);return null; 
}  // Fallback: we have no idea how to serialize this.  Be noisy to
prevent insidious bugs  throw new
SolrException(SolrException.ErrorCode.SERVER_ERROR,  "TransactionLog
doesn't know how to serialize " + o.getClass() + "; try implementing
ObjectResolver?");}  };



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Schema Change for Solr 7.4

2018-08-13 Thread THADC
Hi Shawn, thanks for this response. We are probably going to take your
suggested approach:

1. Upload a new configset to ZooKeeper. 
2. Create a new collection using the new configset. 
3. Index data into the new collection. 
4. Set up an alias with the original collection name, pointing at the 
new collection. 
5. When you're sure it's good, delete the old collection. 

I have a question about step 4. What is the actual mechanism for the
aliasing? Is the alias something that would be defined in the schema.xml
file, or are you speaking more generally about something that would be
crafted in our application code or even like a sym link at the operating
system level?

Thanks, Tim



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: SolrCloud CDCR issue

2018-08-13 Thread cdatta
I am following the workaround mentioned over here related to auth.
https://stackoverflow.com/questions/48790621/solr-cdcr-doesnt-work-if-the-authentication-is-enabled.
 

My question is why all documents are not getting forwarded? Is there
something else that we are we missing here?
Also wondering is there any restriction we have from the CDCR standpoint to
have 3 DCs as ACTIVE/ACTIVE/ACTIVE scenario.

Regards,
Chandi



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: UUIDField in defined schema

2018-08-13 Thread Edward Ribeiro
Go to the solrconfig.xml and replace the schemaless mode opening tag of
 named "add-unknown-fields-to-the-schema" by
this one:



It will auto-generate the UUID. If you want to use a UUIDField instead of
string for the uniqueKey (id) then make the changes below in managed-schema:




Edward

On Wed, Aug 8, 2018 at 1:16 PM, Steve Pruitt  wrote:

> Admin guide has UUIDField as a field type, but it's not defined in the
> default schema.
>
> The Admin guide describes it in conjunction with the
> UUIDUpdateProcessorFactory.  I see the updateProcessor defined in the
> default schema.
>
> The only place I see UUIDUpdateProcessorFactory discussed in the Admin
> guide is in the context of schemaless mode.  I don't want to use schemaless
> mode.
>
> What is an example for using UUIDField not in schemaless mode?  Do I have
> to define a /update request handler?  Is there an easier way?
>
> Thanks.
>
> -S
>


Re: create Nested index structure SOLR

2018-08-13 Thread Mikhail Khludnev
This is just a flatten internal representation of actually nested docs.

On Mon, Aug 13, 2018 at 2:00 PM sonaliw  wrote:

> I want to create nested index structure with SOLR import handler. I am
> using
> Solr -7.2 ,I have created data-config.xml
> (https://issues.apache.org/jira/browse/SOLR-5147),
>
> 
> 
>   
>   
>   
>   
> 
> 
> 
>   
> 
>  
> but I am not getting nested index document as result of below query,
>
> http://xyzhost:8983/solr/myCollection/select?fl=,[child%20parentFilter=title:%22test%22]=:*
>
> Imported document looks like below,
>
> ` "response":{"numFound":6,"start":0,"docs":[
>   {
> "post":"dev1",
> "parent_id":"1",
> "id":"1",
> "_version_":1608402260456374272},
>   {
> "post":"dev3",
> "parent_id":"1",
> "id":"3",
> "_version_":1608402260456374272},
>   {
> "id":"1",
> "title":"test1",
> "_version_":1608402260456374272},
>   {
> "post":"dev2",
> "parent_id":"2",
> "id":"2",
> "_version_":1608402260460568576},
>   {
> "post":"dev4",
> "parent_id":"4",
> "id":"4",
> "_version_":1608402260460568576},
>   {
> "id":"2",
> "title":"test2",
> "_version_":1608402260460568576}]
> }}`
>
> What I am missing here ?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
Sincerely yours
Mikhail Khludnev


SOLR 7.x stable version

2018-08-13 Thread abhi Abhishek
Hi All -
 I am using SOLR Cloud v6.5.0 and looking to upgrade it to SOLR 7.x;
any suggestions which are the most stable version in SOLR 7.x series.
from my initial reading, I see until SOLR 7.2 we had issues with CDCR
updates.

Thank you for your suggestions.

Thanks,
Abhishek


create Nested index structure SOLR

2018-08-13 Thread sonaliw
I want to create nested index structure with SOLR import handler. I am using
Solr -7.2 ,I have created data-config.xml
(https://issues.apache.org/jira/browse/SOLR-5147),



  
  
  
  



  
   
 
but I am not getting nested index document as result of below query,
http://xyzhost:8983/solr/myCollection/select?fl=,[child%20parentFilter=title:%22test%22]=:*
 

Imported document looks like below,

` "response":{"numFound":6,"start":0,"docs":[
  {
"post":"dev1",
"parent_id":"1",
"id":"1",
"_version_":1608402260456374272},
  {
"post":"dev3",
"parent_id":"1",
"id":"3",
"_version_":1608402260456374272},
  {
"id":"1",
"title":"test1",
"_version_":1608402260456374272},
  {
"post":"dev2",
"parent_id":"2",
"id":"2",
"_version_":1608402260460568576},
  {
"post":"dev4",
"parent_id":"4",
"id":"4",
"_version_":1608402260460568576},
  {
"id":"2",
"title":"test2",
"_version_":1608402260460568576}]
}}`

What I am missing here ?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Rich Text Format - Clob

2018-08-13 Thread tfaltinat
Hi Alex,

I'm using the ClobTransformer but now I'm getting ClassCastException:
java.io.StringReader cannot be cast to java.io.InputStream 

Maybe just my configuration is not okay.

Regards,
Torsten



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: SolrCloud CDCR issue

2018-08-13 Thread Amrit Sarkar
To the concerned,

I am afraid in informing, Authentication are not supported between Solr
clusters: https://issues.apache.org/jira/browse/SOLR-11959.

Amrit Sarkar
Search Engineer
Lucidworks, Inc.
415-589-9269
www.lucidworks.com
Twitter http://twitter.com/lucidworks
LinkedIn: https://www.linkedin.com/in/sarkaramrit2
Medium: https://medium.com/@sarkaramrit2


On Sat, Aug 11, 2018 at 10:32 AM cdatta  wrote:

> I followed the exact steps you suggested. Now I am not seeing that error.
>
> INFO  - 2018-08-10 15:23:58.159; [c:collection_name s:shard2 r:core_node13
> x:collection_name_shard2_replica_n10]
> org.apache.solr.handler.CdcrReplicator; Forwarded 10 updates to target
> collection_name
>
> However, in destination DC, I am seeing different numFounds per retry. Even
> after CORE reload it's not showing exact same number.
>
> Source: Total Doc: 1310
> Destination: Total Doc :1310
>  :908
>  :457
>
> I stopped the indexing and waited for the max autocommit interval for that
> collection to expire. Even after that, did not get consistent results. Do I
> have to send explicit hard commit?
>
> Source/Desination DC: I am seeing following error now though a. Not sure if
> this is related to an existing CDCR JIRA I saw.
>
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
> from server at http://host:8983/solr/collection_name_shard1_replica_n2:
> Expected mime type application/octet-stream but got text/html. 
> 
> 
> Error 401 require authentication
> 
> 
> HTTP ERROR 401
>
> Problem accessing /solr/collection_name_shard1_replica_n2/cdcr. Reason:
> require authentication
> 
> 
>
>   at
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:607)
>   at
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)
>   at
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)
>   at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219)
>   at org.apache.solr.handler.CdcrUpdateLogSynchronizer$UpdateLogSynchronis
>
> org.apache.solr.common.SolrException: Unable to locate core
> collection_name_shard1_replica_n2
>   at
>
> org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$5(CoreAdminOperation.java:149)
>   at
>
> org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:358)
>   at
>
> org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:389)
>
>
> Here is our security.json
>
> {
>   "authentication":{
> "blockUnknown":true,
> "class":"solr.BasicAuthPlugin",
> "credentials":{
>   "solr":"--REDACTED--",
>   "admin":"--REDACTED--",
>   "solr_dev":"--REDACTED--",
>   "app_2_user":"--REDACTED--",
>   "app_1_user":"--REDACTED--"},
> "":{"v":6}},
>   "authorization":{
> "class":"solr.RuleBasedAuthorizationPlugin",
> "permissions":[
>   {
> "name":"security-edit",
> "role":"admin",
> "index":1},
>   {
> "name":"collection-admin-read",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":2},
>   {
> "name":"read",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":3},
>   {
> "name":"core-admin-read",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":4},
>   {
> "name":"schema-read",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":5},
>   {
> "name":"config-read",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":6},
>   {
> "name":"admin-ui",
> "path":"/",
> "role":[
>   "read",
>   "read_write",
>   "admin"],
> "index":7},
>   {
> "collection":null,
> "path":"/admin/zookeeper",
> "role":["admin"],
> "index":8},
>   {
> "collection":"*",
> "path":"/admin/file",
> "role":["admin"],
> "index":9},
>   {
> "collection":"*",
> "path":"/admin/files",
> "role":"admin",
> "index":10},
>   {
> "collection":"*",
> "path":"/dataimport",
> "role":["admin"],
> "index":11},
>   {
> "name":"collection-admin-edit",
> "role":["admin"],
> "index":12},
>   {
> "name":"update",
> "role":[
>   "admin",
>   "read_write"],
> "index":13},
>   {
> "name":"schema-edit",
> "role":["admin"],
> "index":14},
>   {
> "name":"config-edit",
> "role":["admin"],
> "index":15},
>   {
> "name":"core-admin-edit",
> "role":["admin"],
> "index":16}],
> 

Re: Docvalue v.s. invert index

2018-08-13 Thread Mikhail Khludnev
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/schema/FieldType.java#L881

https://github.com/apache/lucene-solr/blob/17eb8cd14d27d2680fe7c4b3871f3eb883542d34/solr/core/src/java/org/apache/solr/search/facet/FacetField.java#L106


On Mon, Aug 13, 2018 at 9:02 AM Zahra Aminolroaya 
wrote:

> Thanks Erick, Shawn and Tomoko for complete answers.
>
> If I set both docvalue and indexed "true" in a field, will Solr understand
> to use which technique for faceting or searching? Or Is there any way to
> inform Solr to use which technique?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
Sincerely yours
Mikhail Khludnev


about the value of key "hl"(highlight) ,in solr 7.4

2018-08-13 Thread 魏北南
Hello,


 I thinkthe value of the  key "hl"(highlight)is incorrect ,,in 
solr 7.4;
 when I do some operations in UI,for example, query some key words and 
expect high light;and then I do, but I found some strange info from the log 
info:
*
2018-08-10 15:22:52.745 INFO  (qtp817348612-16) [   x:testcore] 
o.a.s.c.S.Request [testcore]  webapp=/solr path=/select 
params={q=goods_title:简介=on==goods_title=&_=1533914503089}
 hits=1 status=0 QTime=284
***
 why is "h1=on"?why not "h1=true"?
In fact ,"h1=on" can give me the expected response,"h1=true" not;
I think above doesn't match with the Official documents
   

BRs
Wei Devin

Re: Docvalue v.s. invert index

2018-08-13 Thread Zahra Aminolroaya
Thanks Erick, Shawn and Tomoko for complete answers.
 
If I set both docvalue and indexed "true" in a field, will Solr understand
to use which technique for faceting or searching? Or Is there any way to
inform Solr to use which technique?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html