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 Kalidoss MM <mm...@gmail.com> on 2009/01/05 13:33:08 UTC
Issue with Java Client code
Hi,
We have created a Java EmbeddedSolrServer Client Code, I can able to
add, delete, update the Solr content - At the same time i cant able to
search the updated conente from the Running Solr client(jetty) web
interface.
My requirement is, All search need to happen from/by running web
Solr(jetty, 8983) and all write should happened from Java client code.
Both(jeety and javaclient) are using 'Core0' as core name, and both data
directory, schema, solrconfig are same. - is there any fix available??
Case1:
1) solr started in 8983 port as Core0,
2) Running a java client(Core0) to add one record say "hitest", with
commit
3) when i search for hitest, am not getting any result,
4) after i restart the solr(8983) and search for 'hitest' am getting
the result.
-
- both Solr, java client is using the same dada directory, schema.xml,
solrconfig.xml
fyi: even this java client is working when solr is not started
is it possible to handle the read/search by webinterface, and all write
from java-client(with out http) ????
Thanks in advance,
Kalidoss.m,
Re: Issue with Java Client code
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 5, 2009, at 8:25 AM, Kalidoss MM wrote:
> Is it possible to issue the commit to the Solr Server from that java
> code it
> self??
Of course... using CommonsHttpSolrServer#commit
Erik
>
>
> I have tried the same by issueing the command in terminal
> (/solr/bin/./commit) and it worked..
>
> Please let me know. is it possible to do the same in java code it
> self?
>
> kalidoss.m,
>
> On Mon, Jan 5, 2009 at 6:18 PM, Erik Hatcher <erik@ehatchersolutions.com
> >wrote:
>
>>
>> On Jan 5, 2009, at 7:33 AM, Kalidoss MM wrote:
>>
>>> We have created a Java EmbeddedSolrServer Client Code, I can able
>>> to
>>> add, delete, update the Solr content - At the same time i cant
>>> able to
>>> search the updated conente from the Running Solr client(jetty) web
>>> interface.
>>>
>>> My requirement is, All search need to happen from/by running web
>>> Solr(jetty, 8983) and all write should happened from Java client
>>> code.
>>>
>>> Both(jeety and javaclient) are using 'Core0' as core name, and
>>> both data
>>> directory, schema, solrconfig are same. - is there any fix
>>> available??
>>>
>>> Case1:
>>> 1) solr started in 8983 port as Core0,
>>> 2) Running a java client(Core0) to add one record say
>>> "hitest", with
>>> commit
>>> 3) when i search for hitest, am not getting any result,
>>> 4) after i restart the solr(8983) and search for 'hitest' am
>>> getting
>>> the result.
>>>
>>> -
>>> - both Solr, java client is using the same dada directory,
>>> schema.xml,
>>> solrconfig.xml
>>> fyi: even this java client is working when solr is not started
>>>
>>>
>>> is it possible to handle the read/search by webinterface, and all
>>> write
>>> from java-client(with out http) ????
>>>
>>
>> You'll need to issue the <commit/> to the Solr server (not the
>> embedded
>> one) for it to take place there. A commit to EmbeddedSolrServer
>> will make
>> newly added documents visible through _that_ SolrServer, but not to
>> anyone
>> other process (such as Solr via jetty) pointing at the Lucene index.
>>
>> Erik
>>
>>
Re: Issue with Java Client code
Posted by Kalidoss MM <mm...@gmail.com>.
Is it possible to issue the commit to the Solr Server from that java code it
self??
I have tried the same by issueing the command in terminal
(/solr/bin/./commit) and it worked..
Please let me know. is it possible to do the same in java code it self?
kalidoss.m,
On Mon, Jan 5, 2009 at 6:18 PM, Erik Hatcher <er...@ehatchersolutions.com>wrote:
>
> On Jan 5, 2009, at 7:33 AM, Kalidoss MM wrote:
>
>> We have created a Java EmbeddedSolrServer Client Code, I can able to
>> add, delete, update the Solr content - At the same time i cant able to
>> search the updated conente from the Running Solr client(jetty) web
>> interface.
>>
>> My requirement is, All search need to happen from/by running web
>> Solr(jetty, 8983) and all write should happened from Java client code.
>>
>> Both(jeety and javaclient) are using 'Core0' as core name, and both data
>> directory, schema, solrconfig are same. - is there any fix available??
>>
>> Case1:
>> 1) solr started in 8983 port as Core0,
>> 2) Running a java client(Core0) to add one record say "hitest", with
>> commit
>> 3) when i search for hitest, am not getting any result,
>> 4) after i restart the solr(8983) and search for 'hitest' am getting
>> the result.
>>
>> -
>> - both Solr, java client is using the same dada directory, schema.xml,
>> solrconfig.xml
>> fyi: even this java client is working when solr is not started
>>
>>
>> is it possible to handle the read/search by webinterface, and all write
>> from java-client(with out http) ????
>>
>
> You'll need to issue the <commit/> to the Solr server (not the embedded
> one) for it to take place there. A commit to EmbeddedSolrServer will make
> newly added documents visible through _that_ SolrServer, but not to anyone
> other process (such as Solr via jetty) pointing at the Lucene index.
>
> Erik
>
>
Re: Issue with Java Client code
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 5, 2009, at 7:33 AM, Kalidoss MM wrote:
> We have created a Java EmbeddedSolrServer Client Code, I can able
> to
> add, delete, update the Solr content - At the same time i cant able to
> search the updated conente from the Running Solr client(jetty) web
> interface.
>
> My requirement is, All search need to happen from/by running web
> Solr(jetty, 8983) and all write should happened from Java client code.
>
> Both(jeety and javaclient) are using 'Core0' as core name, and
> both data
> directory, schema, solrconfig are same. - is there any fix available??
>
> Case1:
> 1) solr started in 8983 port as Core0,
> 2) Running a java client(Core0) to add one record say
> "hitest", with
> commit
> 3) when i search for hitest, am not getting any result,
> 4) after i restart the solr(8983) and search for 'hitest' am
> getting
> the result.
>
> -
> - both Solr, java client is using the same dada directory,
> schema.xml,
> solrconfig.xml
> fyi: even this java client is working when solr is not started
>
>
> is it possible to handle the read/search by webinterface, and all
> write
> from java-client(with out http) ????
You'll need to issue the <commit/> to the Solr server (not the
embedded one) for it to take place there. A commit to
EmbeddedSolrServer will make newly added documents visible through
_that_ SolrServer, but not to anyone other process (such as Solr via
jetty) pointing at the Lucene index.
Erik