On Sun, Dec 11, 2016 at 11:22 AM, moscovig <mosco...@gmail.com> wrote:
> Hi
> In solr 6.2.1 as server and solr 6.2.0 for client
> It's a 2 shards index, 3 replicas for each shard.
>
> We are fetching the latest document with sorting over creationTime desc and
> rows=1.
>
> At the same time we are committing sanity tests that insert documents and
> delete them immediately.
>
> The weird thing is that sometimes we get an empty result set from the sort
> by creation time desc and rows=1,
> even though we have lots of documents in the index.
>
> It seems like at some point, the latest document is the sanity document that
> gets deleted, and we are trying to fetch that document, but it then gets
> deleted and we get an empty result set. We would expect Solr to send that
> document back or any other non deleted document.
> What could be the problem?
> Is this some kind of a bug in solr?

If there are documents in the index that should match the query, then
it would be a bug.
What query do you use?  If you use q=*:*&sort=creationTime desc&rows=1
then you should always get a document (since you indicate there are
many documents in the index).

If you don't, then first look to see if you have any custom plugins,
custom queries, or search processors that can change the result list.

-Yonik

Reply via email to