Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Martin Grotzke
    @magro
    So solrs has also a gitter room...
    Zak Patterson
    @zakpatterson

    Guess i'm posting the first message to this room...

    I'm getting a runtime error: java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.setHeader(Ljava/lang/String;Ljava/lang/Object;)V
    Just trying to do the initial connection. Trying to investigate before making an issue. I've rebuilt/clean compiled everything.

    looks like another dependency (reactivemongo) is disagreeing about which netty version to use.
    Zak Patterson
    @zakpatterson
    yep, looks like adding "io.netty" % "netty" % "3.9.2.Final" force() fixed it. I don't know at all how netty works but it looks like something is pinned to 3.9 instead of 3.10
    Martin Grotzke
    @magro
    Welcome @zakpatterson, and great that you figured it out!
    Suman Saurabh
    @sumansaurabh
    does it support solr 6.1.0
    Martin Grotzke
    @magro
    Currently not, I'm working on it. Actual production code changes are minimal, only integration tests are the issue right now.
    Martin Grotzke
    @magro
    I could publish a release candidate and finish integration tests later, WDYT?
    Suman Saurabh
    @sumansaurabh
    Yes, that would be very helpful. Thank you
    let me know if I could be of some help
    Martin Grotzke
    @magro
    I just released 1.5.0 built with solr 6.1.0, integration tests are also green now... Please let me know how it works for you.
    Tae-Gil Noh
    @gilnoh
    Hello Martin, and all, very happy to find Gitter for SolrS (maybe add the link to Gitter on SolrS readme!).
    I have a question on the load balancing aspect. I find it VERY interesting -- but was wondering how to add documents over multiple Solr servers. Is there a way to easily add document over all servers registered in LoadBalancer? What would be a good way to do this? I've briefly checked the current code of addDoc, and it seems to me that it just pick a server just like all other queries ...
    Martin Grotzke
    @magro
    Hi @gilnoh, I'm not sure what you're exactly looking for. Basically the solr client sends a doc to a single solr server / the solrcloud, which then takes care of replication. Or are you referring to sharding?
    Tae-Gil Noh
    @gilnoh
    Ah, sorry bout the confusion. I was wondering why/how solr client keep multiple servers -- since the only scalable solr model I've been using was SolrCloud: there it is not the clients role to keep track of worker instances. So my question is what is the use case of this load balancing aspect of the solrs client. Is this for solr replication situation then? e.g all updates should be sent to the master solr server (eg add documents) and then the queries are sent to slave clients where thos
    .. where those clients are registered in the solrs load balancing?
    Martin Grotzke
    @magro
    The load balancing is motivated by queries, to distribute query load over multiple replicas. CloudSolrClient does the same (but only provides random distribution). Regarding writes, solrs currently does not provide specific sharding support as send-to-master, but leaves this to the solrcloud. You could submit a ticket or ever better a PR :smile:
    Tae-Gil Noh
    @gilnoh
    Got it. Thanks for the clarification. :-)
    Martin Grotzke
    @magro
    You're welcome
    Martin Grotzke
    @magro
    @all I just pushed 2.0.0-RC5 to maven central. It's now built with coursier and zinc - if you experience any issues please let me know!
    Fernando
    @nandotorterolo
    Hi, do you have a room for inoio/sbt-pillar-plugin ?
    Martin Grotzke
    @magro
    @nandotorterolo I just created it: https://gitter.im/inoio/sbt-pillar-plugin
    Niranjan
    @nnanda2016
    @magro is there a best practice to use JavaAsyncSolrClient? I am planning to use it in my web app; so I want to know if it's thread safe or not. Currently we use SolrJ's CloudSolrClient which is thread-safe and we share a singleton instance of this for all incoming requests. Can we do same for JavaAsyncSolrClient?
    Martin Grotzke
    @magro
    @nnanda2016 yes, it's thread safe
    Niranjan
    @nnanda2016
    Thanks Martin
    Hailong Wang
    @seadragonwang
    Anyone knows how to add data of multivalued field?
    Niranjan
    @nnanda2016
    @seadragonwang do you need anything special? I think just using SolrInputDocument.setField(fieldName, fieldValue) should work. Basically if you do not define the type in schema, Solr will automatically define it as multivalued.
    Martin Grotzke
    @magro
    @seadragonwang what Niranjan said, and fieldValue can be of type Array and java.util.Collection.
    Niranjan
    @nnanda2016
    @magro how can I configure timeouts (and other properties) for the underlying async-http library or netty? I am using Solr Clound and the samples (http://inoio.github.io/solrs/usage/solrcloud.html) show only to configure ZK related timeouts
    Martin Grotzke
    @magro
    @nnanda2016 As said in http://inoio.github.io/solrs/usage/index.html you can set your own AsyncHttpClient, which you can configure according to your needs.
    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