by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Yakov
    @yabushraber
    Hi, thank you for the great solr library, how can add header for basic authentication? thanks
    Martin Grotzke
    @magro
    @yabushraber sorry for the delay, I missed your message.
    One way should be to use request interception (see http://inoio.github.io/solrs/usage/request-interception.html), i.e. s.th. like the following should work:
    val interceptor = new RequestInterceptor {
      override def interceptRequest[T <: SolrResponse](f: (SolrServer, SolrRequest[_ <: T]) => future.Future[T])
                                                      (solrServer: SolrServer, r: SolrRequest[_ <: T]): future.Future[T] = {
        r.setBasicAuthCredentials("user", "pass")
        f(solrServer, r)
      }
    }
    val solr = AsyncSolrClient.Builder(solrUrl).withRequestInterceptor(interceptor).build
    Martin Grotzke
    @magro
    Another way should be to configure the http client with an appropriate request filter like this:
    val requestFilter = new RequestFilter {
      override def filter[T](ctx: FilterContext[T]): FilterContext[T] = {
        val auth = "user:pass"
        val encodedAuth = Base64.getEncoder.encode(auth.getBytes(StandardCharsets.UTF_8))
        val authHeader = "Basic " + new String(encodedAuth)
        new FilterContext.FilterContextBuilder(ctx)
          .request(new RequestBuilder(ctx.getRequest).addHeader("Authorization", authHeader).build())
          .build()
      }
    }
    val httpClient = new DefaultAsyncHttpClient(new DefaultAsyncHttpClientConfig.Builder().addRequestFilter(requestFilter).build)
    val solr = AsyncSolrClient.Builder(solrUrl).withHttpClient(httpClient).build
    Ativ Aggarwal
    @ativ97
    Hey Martin! Thank you for such an ama I am new to solr and am trying to implement a client in scala. I am running solrCloud version 4.10.3 so I had to use solrs
    *
    Hey Martin! Thank you for such an amazing library! I am new to solr and am trying to implement a client in scala. I am running solrCloud version 4.10.3 so I had to use solrs 1.0.1
    And I am trying to add some documents to my solr cloud but it looks like solrs 1.0.1 does not support adding documents to solr. Is that correct? If so, any workaround for this?
    Martin Grotzke
    @magro
    @ativ97 That's correct. I think there are the following options:
    • see if the newer solrs version works with your solrcloud installation
    • use solrj for adding docs
    • backport the "add" feature
    • upgrade your solrcloud installation
    Erol Akarsu
    @eakarsu
    Hey I am getting some weird issue
    Anybody can help here?
    Erol Akarsu
    @eakarsu
    Integrating solrs with spark that is getting data couchbase. Spark is getting data from couchbase and the indexing it on inoio
    Erol Akarsu
    @eakarsu
    Indexing on solr with inoio.
    Martin Grotzke
    @magro
    @eakarsu So what's the issue?
    Collin Reynolds
    @creynold
    I'm trying to use the addDocs(collection, documents) method, but it's not posting to the collection URI. Am I missing something?
    Martin Grotzke
    @magro
    @creynold I would expect the same. To be honest I haven't used that on my own, this was a contribution/PR. Maybe you could check tests if that's covered?
    Collin Reynolds
    @creynold
    It's not covered in tests, and if I add a test it fails as my code is failing
    Collin Reynolds
    @creynold
    It seems that this would only work with a cloud client
    Martin Grotzke
    @magro
    Would be great if you could submit a PR for this... 🙂
    Collin Reynolds
    @creynold
    I'll take a look :)
    Martin Grotzke
    @magro
    👍🙂
    Erol Akarsu
    @eakarsu
    Hello
    I have a question on using your solr scala api.
    I like to to use solr cloud client with zk information but index raw solr document. How can I do it? Thanks
    Erol Akarsu
    @eakarsu
    Having problem. I have products collection in zk
    but inoio says products collection in not found
    I think it is not able to connect to zk server to pull all data from it
    Martin Grotzke
    @magro
    Hey @eakarsu, sorry for the delayed response - is this still relevant?
    vspolireddy
    @vspolireddy
    Hello All does Solrs support solr 8?
    Martin Grotzke
    @magro
    Hi @vspolireddy, so far it does not. I started to work on this in inoio/solrs#76, not sure why I didn't merge/continue 😉
    Right now this PR has a conflict, if you like you could clean this up and submit a new one...