You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by SRINI SOLR <sr...@gmail.com> on 2016/06/09 10:13:15 UTC

Sorl 4.3.1 - Does not load the new data using the Java application

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.*

Re: Sorl 4.3.1 - Does not load the new data using the Java application

Posted by Shawn Heisey <ap...@elyograg.org>.
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


Re: Sorl 4.3.1 - Does not load the new data using the Java application

Posted by Upayavira <uv...@odoko.co.uk>.
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 <uv...@odoko.co.uk> 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.*
> >

Re: Sorl 4.3.1 - Does not load the new data using the Java application

Posted by SRINI SOLR <sr...@gmail.com>.
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 <uv...@odoko.co.uk> 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.*
>

Re: Sorl 4.3.1 - Does not load the new data using the Java application

Posted by Upayavira <uv...@odoko.co.uk>.
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.*