FAQ
Hi Team -
Can you please help me out on the below issue ...

We are using the Solr 4.3.1 version.

Integrated Solr 4.3.1 with Java application using EmbeddedSolrServer.

Using this EmbeddedSolrServer in java - loading the core container as
below ...
*embeddedSolrServer.getCoreContainer().load();*

We are loading the container at the time of initiating the
ApplicationContext. And now Java application is able to access the indexed
data.

*Now the issue is - *
*If I index the new data in Solr - the same data is not getting loaded
through Java application until and un-less if I again load the Core
Container using **embeddedSolrServer.getCoreContainer().load().*

Can you please help me out to on how to access the new data (which is
indexed on Solr) using java application with out calling every-time
*embeddedSolrServer.getCoreContainer().load().*

*??? *

*Please help me out ... I am stuck and not able to proceed further ... It
is leading to critical issue ...*

*Thanks In Advance.*

Search Discussions

  • Upayavira at Jun 9, 2016 at 10:38 am
    Are you executing a commit?

    You must commit before your content becomes visible.

    Upayavira
    On Thu, 9 Jun 2016, at 11:13 AM, SRINI SOLR wrote:
    Hi Team -
    Can you please help me out on the below issue ...

    We are using the Solr 4.3.1 version.

    Integrated Solr 4.3.1 with Java application using EmbeddedSolrServer.

    Using this EmbeddedSolrServer in java - loading the core container as
    below ...
    *embeddedSolrServer.getCoreContainer().load();*

    We are loading the container at the time of initiating the
    ApplicationContext. And now Java application is able to access the
    indexed
    data.

    *Now the issue is - *
    *If I index the new data in Solr - the same data is not getting loaded
    through Java application until and un-less if I again load the Core
    Container using **embeddedSolrServer.getCoreContainer().load().*

    Can you please help me out to on how to access the new data (which is
    indexed on Solr) using java application with out calling every-time
    *embeddedSolrServer.getCoreContainer().load().*

    *??? *

    *Please help me out ... I am stuck and not able to proceed further ... It
    is leading to critical issue ...*

    *Thanks In Advance.*
  • SRINI SOLR at Jun 9, 2016 at 12:37 pm
    Hi Upayavira / Team -
    Can you please explain in-detail - how to do the commit...?

    if we do the commit - Will the new data will be available to Java
    Application with-out calling *embeddedSolrServer.*
    *getCoreContainer().load()*. again. ...?

    Please help me here ...

    Thanks in Advance.







    On Thu, Jun 9, 2016 at 4:08 PM, Upayavira wrote:

    Are you executing a commit?

    You must commit before your content becomes visible.

    Upayavira
    On Thu, 9 Jun 2016, at 11:13 AM, SRINI SOLR wrote:
    Hi Team -
    Can you please help me out on the below issue ...

    We are using the Solr 4.3.1 version.

    Integrated Solr 4.3.1 with Java application using EmbeddedSolrServer.

    Using this EmbeddedSolrServer in java - loading the core container as
    below ...
    *embeddedSolrServer.getCoreContainer().load();*

    We are loading the container at the time of initiating the
    ApplicationContext. And now Java application is able to access the
    indexed
    data.

    *Now the issue is - *
    *If I index the new data in Solr - the same data is not getting loaded
    through Java application until and un-less if I again load the Core
    Container using **embeddedSolrServer.getCoreContainer().load().*

    Can you please help me out to on how to access the new data (which is
    indexed on Solr) using java application with out calling every-time
    *embeddedSolrServer.getCoreContainer().load().*

    *??? *

    *Please help me out ... I am stuck and not able to proceed further ... It
    is leading to critical issue ...*

    *Thanks In Advance.*
  • Upayavira at Jun 9, 2016 at 1:57 pm
    Firstly, I'm not sure why you are using embeddedSolrServer. You would be
    much better off running a standalone Solr server, and connecting to it
    with a SolrClient, in Java. Then you can do client.commit(); to execute
    a commit.

    EmbeddedSolrServer behaves slightly differently from normal Solr, and
    will get you into trouble (e.g. like this), so I'd suggest you just
    start up a Solr as described in all of the tutorials, and use it the
    normal way.

    Upayavira
    On Thu, 9 Jun 2016, at 01:36 PM, SRINI SOLR wrote:
    Hi Upayavira / Team -
    Can you please explain in-detail - how to do the commit...?

    if we do the commit - Will the new data will be available to Java
    Application with-out calling *embeddedSolrServer.*
    *getCoreContainer().load()*. again. ...?

    Please help me here ...

    Thanks in Advance.







    On Thu, Jun 9, 2016 at 4:08 PM, Upayavira wrote:

    Are you executing a commit?

    You must commit before your content becomes visible.

    Upayavira
    On Thu, 9 Jun 2016, at 11:13 AM, SRINI SOLR wrote:
    Hi Team -
    Can you please help me out on the below issue ...

    We are using the Solr 4.3.1 version.

    Integrated Solr 4.3.1 with Java application using EmbeddedSolrServer.

    Using this EmbeddedSolrServer in java - loading the core container as
    below ...
    *embeddedSolrServer.getCoreContainer().load();*

    We are loading the container at the time of initiating the
    ApplicationContext. And now Java application is able to access the
    indexed
    data.

    *Now the issue is - *
    *If I index the new data in Solr - the same data is not getting loaded
    through Java application until and un-less if I again load the Core
    Container using **embeddedSolrServer.getCoreContainer().load().*

    Can you please help me out to on how to access the new data (which is
    indexed on Solr) using java application with out calling every-time
    *embeddedSolrServer.getCoreContainer().load().*

    *??? *

    *Please help me out ... I am stuck and not able to proceed further ... It
    is leading to critical issue ...*

    *Thanks In Advance.*
  • Shawn Heisey at Jun 9, 2016 at 6:47 pm

    On 6/9/2016 4:13 AM, SRINI SOLR wrote:
    *Now the issue is - *
    *If I index the new data in Solr - the same data is not getting loaded
    through Java application until and un-less if I again load the Core
    Container using **embeddedSolrServer.getCoreContainer().load().*
    This sounds like you are not doing a commit. Newly indexed data will
    not be visible until it is committed. Reloading/restarting will also
    effectively do a commit.

    You can do this explicitly with the commit() method on the server
    object. You can include a commitWithin parameter on your indexing
    requests. You can also configure autoSoftCommit in solrconfig.xml.

    Thanks,
    Shawn

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsolr-user @
categorieslucene
postedJun 9, '16 at 10:13a
activeJun 9, '16 at 6:47p
posts5
users3
websitelucene.apache.org...

People

Translate

site design / logo © 2019 Grokbase