lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Embedded Server and Webapp using same Index???
Date Sat, 01 May 2010 21:45:50 GMT
The problem here, I think, is that you're updating the
index in a manner that the regular SOLR webapp doesn't
know about. So the index changes without SOLR knowing
it has to reopen the index to see the modifications.

Something to try:
curl http://localhost:8983/solr/update -F stream.body=' <commit />'
This *might* force SOLR to reopen the underlying index, but I
admit I haven't tried it (stolen from the SOLR 1.4 e-book). I'm not
entirely sure that this will actually do what you want, it's possible
that the SOLR webapp will no-op it since the webapp hasn't seen
the changes.

When you stop and restart the server, you're forcing the underlying
IndexReader to reopen, which is why you're getting the changes after
you restart.

I'm pretty sure that what you want is possible without restarting the
server, it's just the mechanics of how to make it happen that I'm not
entirely clear about.

In general, you should have one process updating the index, but
any number of processes you want *reading* the index.

HTH
Erick

On Sat, May 1, 2010 at 3:39 PM, John Gillies <jsgillies@yahoo.com> wrote:

> I've been searching in vain for an answer to my question so hopefully
> someone on the mail list has the answer or a solution.
>
> I am attempting to use the Solr Embedded Server to generate my index and
> then utilize the Solr Web Application to query the same index and it works
> great if I restart the Solr Web Application after I've created the index,
> which is not ideal.
>
> Is what I want to do possible?
>
> The application that is doing the indexing and the Solr web application are
> both running fine in JBoss and I want to use the embedded server for
> indexing due to better performance.  I have 250,000 documents to index once
> a week and I'd like the index to be available for searching as it is
> indexed.  I commit to the embedded server every 100 documents so that number
> of documents being indexed isn't too many and take to long to process.
>
> So I guess the root question is can you have the embedded server and the
> Solr webapp looking and using the same core index at the same time?
>
> Should I use a master slave replication where the embedded server is
> creating the index for the master and the Solr Web app is querying the slave
> index?  If so How do you setup the embedded server as a master, since there
> is no URL to point the Solr Web app to?
>
> Am I missing something simple and fundamental? probably.
>
> I'm currently running this all on Windows for development but in production
> it will be on Linux, does that make a difference?
>
> Is there a specific locking mechanism I need to set (I've tried Native,
> Simple and Single without success).
>
> Is the answer simply that you can't have both the embedded and web app solr
> working off the same Index at the same time and I should just have my
> application index the data via the Solr web app?
>
> Thank you,
>
> John
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message