I'm not sure if you are issuing a separate <commit/> _request_ after
your <add>, or putting a <commit/> into the same request. Solr only
supports one command (add or commit, but not both) per request.
Erik
On May 13, 2008, at 10:36 AM, William Pierce wrote:
Thanks for the comments....
The reason I am just adding one document followed by a commit is
for this particular test --- in actuality, I will be loading
documents from a db. But thanks for the pointer on the ?commit=true
on the add command.
Now on the <commit /> problem itself, I am still confused:
Doesn't the commit count of 1 indicate that the commit is completed?
In any event, just for testing purposes, I started everything
from scratch (deleted all documents, stopped/restarted tomcat). I
noticed that the only files in my index folder were: segments.gen
and segments_1.
Then I did the add followed by <commit /> and noticed that there
were now three files: segments.gen, segments_1 and write.lock.
Now it is 7 minutes later, and when I query the index using the
"http://localhost:59575/splus1/admin/" url, I still do not see the
document.
Again, when I issue another <commit /> command everything seems to
work. Why are TWO commit commands apparently required?
Thanks,
Sridhar
--------------------------------------------------
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Sent: Tuesday, May 13, 2008 6:42 AM
To: <solr-user@lucene.apache.org>
Subject: Re: Commit problems on Solr 1.2 with Tomcat
By default, a commit won't return until a new searcher has been
opened
and the results are visible.
So just make sure you wait for the commit command to return before
querying.
Also, if you are committing every add, you can avoid a separate
commit
command by putting ?commit=true in the URL of the add command.
-Yonik
On Tue, May 13, 2008 at 9:31 AM, Alexander Ramos Jardim
<[EMAIL PROTECTED]> wrote:
Maybe a delay in commit? How may time elapsed between commits?
2008/5/13 William Pierce <[EMAIL PROTECTED]>:
> Hi,
>
> I am having problems with Solr 1.2 running tomcat version
6.0.16 (I also
> tried 6.0.14 but same problems exist). Here is the
situation: I have an
> ASP.net application where I am trying to <add> and <commit> a
single
> document to an index. After I add the document and issue the
<commit /> I
> can see (in the solr stats page) that the commit count has
been increment
> but the docsPending is 1, and my document is still not
visible from a
> search perspective.
>
> When I issue another <commit/>, the commit counter increments,
> docsPending is now zero, and my document is visible and
searchable.
>
> I saw that someone was observing problems with 6.0.16 tomcat,
so I
> reverted back to 6.0.14. Same problem.
>
> Can anyone help?
>
> -- Bill
--
Alexander Ramos Jardim