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 Sunny Bassan <Su...@fox.com> on 2007/11/30 23:25:46 UTC
Embedded SOLR - Commit issue
I have implemented the embedded SOLR approach for indexing of database
records. I am indexing approximately 10 millions records, querying and
indexing 20,000 records at a time. Each record is added to the
updateHandler via the updateHandler.addDoc() function once all 20,000
records have been added a commit() call is made. Issue is that after
this commit call I don't see any changes to the index. Even after an
optimize call, which is called after all records have been added to the
index, I don't see any changes to the index. In order to see changes I
have to manually bounce the SOLR webapp in Tomcat. Is this the designed
functionality? If not what can I do in order to see changes after commit
calls are made? Thanks.
Running SOLR and the embedded SOLR Java app on a Windows XP machine.
Commit and optimize calls:
private static void commit() throws IOException
{
commit(false);
}
private static void optimize() throws IOException
{
commit(true);
}
private static void commit(boolean optimize) throws IOException
{
UpdateHandler updateHandler = core.getUpdateHandler();
CommitUpdateCommand commitcmd = new
CommitUpdateCommand(optimize);
updateHandler.commit(commitcmd);
}
Sunny Bassan
Re: Embedded SOLR - Commit issue
Posted by Ryan McKinley <ry...@gmail.com>.
Sunny Bassan wrote:
> I have implemented the embedded SOLR approach for indexing of database
> records. I am indexing approximately 10 millions records, querying and
> indexing 20,000 records at a time. Each record is added to the
> updateHandler via the updateHandler.addDoc() function once all 20,000
> records have been added a commit() call is made. Issue is that after
> this commit call I don't see any changes to the index. Even after an
> optimize call, which is called after all records have been added to the
> index, I don't see any changes to the index. In order to see changes I
> have to manually bounce the SOLR webapp in Tomcat. Is this the designed
> functionality? If not what can I do in order to see changes after commit
> calls are made? Thanks.
>
How are you searching? using standard HTTP search? If so, just send
your commit with the regular <commit/> message.
If you aren't using standard HTTP searching, it is a bit difficult to
say what you are doing wrong. (EmbeddedSolr is powerful, but it leaves
you a lot of rope)
ryan