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 Jérémie MONSINJON <je...@gmail.com> on 2015/11/19 16:27:42 UTC

RealTimeGetHandler doesn't retrieve documents

Hello everyone !

I'm using SolR 5.3.1 with solrj.SolrClient.
My index is sliced in 3 shards, each on different server. (No replica on
dev platform)
It has been up to date for a few days...

[image: Images intégrées 2]

I'm trying to use the RealTimeGetHandler to get documents by their Id.
In our usecase, documents are updated very frequently,  so  we have to look
in the tlog before searching the index.

When I use the SolrClient.getById() (with a list of document Ids recently
extracted from the index)

SolR doesn't return *all* the documents corresponding to these Ids.
So I tried to use the Solr api directly:

http://server:port/solr/index/get/ids=id1,id2,id3
And this is the same. Some ids don't works.

In my example, id1 doesn't return a document, id2 and id3 or OK.

If I try a filtered query with the id1, it works fine, the document exists
in the index and is found by SolR

Can anybody explain why a document, present in the index, with no
uncommited update or delete, is not found by the Real Time Get Handler ?

Regards,
Jeremie

Re: RealTimeGetHandler doesn't retrieve documents

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/20/2015 5:21 AM, Alexandre Rafalovitch wrote:
> Actually I think / is a special character as of recent version of Solr.
> Can't remember why though.

Surrounding a query with slashes, at least when using the standard
parser, makes it a regex query.  I don't know if this happens with any
of the other parsers.

Thanks,
Shawn


Re: RealTimeGetHandler doesn't retrieve documents

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Actually I think / is a special character as of recent version of Solr.
Can't remember why though.

This could be the kind of things that would trigger an edge case bug.

What happens if you request id3,id2,id1? In the opposite order? Are the
same documents missing? Or same by request position? If later, it is
definitely something about syntax.
On 20 Nov 2015 3:27 am, <je...@gmail.com> wrote:

> Thanks for your answer...
>
> I don't think it's a problem due tp special characters. All my IDs as the
> same format : "/ABCDZ123/123456" with no character with need to be escaped.
>
> And when I use a "normal" query on the key field, it works fine, SolR
> found the document...
>
> Cordialement,
> Monsinjon Jeremie
>
> -----Original Message-----
> From: Jack Krupansky <ja...@gmail.com>
> Date: Thu, 19 Nov 2015 16:50:14
> To: <so...@lucene.apache.org>
> Reply-To: solr-user@lucene.apache.org
> Subject: Re: RealTimeGetHandler doesn't retrieve documents
>
> Do the failing IDs have any special characters that might need to be
> escaped?
>
> Can you find the documents using a normal query on the unique key field?
>
> -- Jack Krupansky
>
> On Thu, Nov 19, 2015 at 10:27 AM, Jérémie MONSINJON <
> jeremie.monsinjon@gmail.com> wrote:
>
> > Hello everyone !
> >
> > I'm using SolR 5.3.1 with solrj.SolrClient.
> > My index is sliced in 3 shards, each on different server. (No replica on
> > dev platform)
> > It has been up to date for a few days...
> >
> > [image: Images intégrées 2]
> >
> > I'm trying to use the RealTimeGetHandler to get documents by their Id.
> > In our usecase, documents are updated very frequently,  so  we have to
> > look in the tlog before searching the index.
> >
> > When I use the SolrClient.getById() (with a list of document Ids recently
> > extracted from the index)
> >
> > SolR doesn't return *all* the documents corresponding to these Ids.
> > So I tried to use the Solr api directly:
> >
> > http://server:port/solr/index/get/ids=id1,id2,id3
> > And this is the same. Some ids don't works.
> >
> > In my example, id1 doesn't return a document, id2 and id3 or OK.
> >
> > If I try a filtered query with the id1, it works fine, the document
> exists
> > in the index and is found by SolR
> >
> > Can anybody explain why a document, present in the index, with no
> > uncommited update or delete, is not found by the Real Time Get Handler ?
> >
> > Regards,
> > Jeremie
> >
> >
>
>

Re: RealTimeGetHandler doesn't retrieve documents

Posted by je...@gmail.com.
Thanks for your answer...

I don't think it's a problem due tp special characters. All my IDs as the same format : "/ABCDZ123/123456" with no character with need to be escaped.

And when I use a "normal" query on the key field, it works fine, SolR found the document...

Cordialement,
Monsinjon Jeremie

-----Original Message-----
From: Jack Krupansky <ja...@gmail.com>
Date: Thu, 19 Nov 2015 16:50:14 
To: <so...@lucene.apache.org>
Reply-To: solr-user@lucene.apache.org
Subject: Re: RealTimeGetHandler doesn't retrieve documents

Do the failing IDs have any special characters that might need to be
escaped?

Can you find the documents using a normal query on the unique key field?

-- Jack Krupansky

On Thu, Nov 19, 2015 at 10:27 AM, Jérémie MONSINJON <
jeremie.monsinjon@gmail.com> wrote:

> Hello everyone !
>
> I'm using SolR 5.3.1 with solrj.SolrClient.
> My index is sliced in 3 shards, each on different server. (No replica on
> dev platform)
> It has been up to date for a few days...
>
> [image: Images intégrées 2]
>
> I'm trying to use the RealTimeGetHandler to get documents by their Id.
> In our usecase, documents are updated very frequently,  so  we have to
> look in the tlog before searching the index.
>
> When I use the SolrClient.getById() (with a list of document Ids recently
> extracted from the index)
>
> SolR doesn't return *all* the documents corresponding to these Ids.
> So I tried to use the Solr api directly:
>
> http://server:port/solr/index/get/ids=id1,id2,id3
> And this is the same. Some ids don't works.
>
> In my example, id1 doesn't return a document, id2 and id3 or OK.
>
> If I try a filtered query with the id1, it works fine, the document exists
> in the index and is found by SolR
>
> Can anybody explain why a document, present in the index, with no
> uncommited update or delete, is not found by the Real Time Get Handler ?
>
> Regards,
> Jeremie
>
>


Re: RealTimeGetHandler doesn't retrieve documents

Posted by Jack Krupansky <ja...@gmail.com>.
Do the failing IDs have any special characters that might need to be
escaped?

Can you find the documents using a normal query on the unique key field?

-- Jack Krupansky

On Thu, Nov 19, 2015 at 10:27 AM, Jérémie MONSINJON <
jeremie.monsinjon@gmail.com> wrote:

> Hello everyone !
>
> I'm using SolR 5.3.1 with solrj.SolrClient.
> My index is sliced in 3 shards, each on different server. (No replica on
> dev platform)
> It has been up to date for a few days...
>
> [image: Images intégrées 2]
>
> I'm trying to use the RealTimeGetHandler to get documents by their Id.
> In our usecase, documents are updated very frequently,  so  we have to
> look in the tlog before searching the index.
>
> When I use the SolrClient.getById() (with a list of document Ids recently
> extracted from the index)
>
> SolR doesn't return *all* the documents corresponding to these Ids.
> So I tried to use the Solr api directly:
>
> http://server:port/solr/index/get/ids=id1,id2,id3
> And this is the same. Some ids don't works.
>
> In my example, id1 doesn't return a document, id2 and id3 or OK.
>
> If I try a filtered query with the id1, it works fine, the document exists
> in the index and is found by SolR
>
> Can anybody explain why a document, present in the index, with no
> uncommited update or delete, is not found by the Real Time Get Handler ?
>
> Regards,
> Jeremie
>
>