Re: SolrJ, CloudSolrClient and basic authentication

2018-05-31 Thread Dimitris Kardarakos
Thanks a lot Shawn. I had tried with the documented approach, but since 
I use SolrClient.add to add documents to the index, I could not "port" 
the documented approach to my case (probably I do miss something).


The custom HttpClient suggestion worked as expected!


On 31/05/2018 06:16 μμ, Shawn Heisey wrote:

On 5/31/2018 8:03 AM, Dimitris Kardarakos wrote:

Following the feedback in the "Index protected zip" thread, I am
trying to add documents to the index using SolrJ API.

The server is in SolrCloud mode with BasicAuthPlugin for authentication.

I have not managed to figure out how to pass username/password to my
client.

There are two ways to approach this.

One approach is to build a custom HttpClient object that uses
credentials by default, and then use that custom HttpClient object to
build your CloudSolrClient.  Exactly how to correctly build the
HttpClient object will depend on exactly which HttpClient version you've
included into your program.  If you go with SolrJ dependency defaults,
then the HttpClient version will depend on the SolrJ version.

The other approach is the method described in the documentation, where
credentials are added to each request object:

https://lucene.apache.org/solr/guide/6_6/basic-authentication-plugin.html#BasicAuthenticationPlugin-UsingBasicAuthwithSolrJ

There are several different kinds of request objects.  A few examples:
UpdateRequest, QueryRequest, CollectionAdminRequest.

Thanks,
Shawn



--
Dimitris Kardarakos



SolrJ, CloudSolrClient and basic authentication

2018-05-31 Thread Dimitris Kardarakos

Hi.

Following the feedback in the "Index protected zip" thread, I am trying 
to add documents to the index using SolrJ API.


The server is in SolrCloud mode with BasicAuthPlugin for authentication.

I have not managed to figure out how to pass username/password to my client.

Thanks,

--
Dimitris Kardarakos



Index protected zip

2018-05-24 Thread Dimitris Kardarakos

Hello everyone.

In Solr 7.3.0 I can successfully index the content of zip files.

But if the zip file is password protected, running something like the below:

curl 
"http://localhost:8983/solr/sample/update/extract?commit=true&&literal.id=enc.zip&resource.password=1234"; 
-H "Content-Type: application/zip" --data-binary @enc.zip


only the names of the files contained are indexed.

Is it a known issue or I am doing sth wrong?

Thanks!

--
Dimitris Kardarakos



index mail with MailEntityProcessor

2018-03-02 Thread Dimitris Kardarakos

Hello everyone.

I have created a collection and indexed mails from a gmail mailbox. 
Nevertheless, only plain text is indexed. Neither html formatted nor 
attachments' indexing works.


To index mails, I have included the below libs to solrconfig:

regex=".*\.jar" />
regex="solr-cell-\d.*\.jar" />


Created mail-data-config.xml as below:


  
  
      fetchMailsSince="2018-01-31 00:00:00" batchSize="20" 
folders="inbox" processAttachement="true" name="mail_entity"/>

  


and added the below as well to solrconfig.

  
    
      mail-data-config.xml
    
  

Please for your support :)

--
Dimitris Kardarakos