Hi Hardy,
On Thu, Sep 24, 2015 at 10:47 AM, Hardy Ferentschik
wrote:
> Ok, still it makes modifications on the actual document id field, which
> should be avoided for the mentioned reasons.
OK. I must admit that as it worked well before, we didn't think a lot about
using the @DocumentId field
On Thu, Sep 24, 2015 at 10:28:14AM +0200, Gunnar Morling wrote:
> > I don't think that just adding @NumericField will do, since it is just a
> > companion
> > annotation to @Field.
>
> It does work (at least as of 5.5 where we fixed some issues around
> @NumericField); It applies to the implicit
> I don't think that just adding @NumericField will do, since it is just a
> companion
> annotation to @Field.
It does work (at least as of 5.5 where we fixed some issues around
@NumericField); It applies to the implicit document id field in this
case.
Hi,
On Thu, Sep 24, 2015 at 09:23:20AM +0200, Gunnar Morling wrote:
> Either way, you should mark the field to sort on with @SortableField
> which will cause that field to get indexed as doc value field, making
> sorting much faster (see [1] and [2] for the details):
>
> @Id
> @NumericFie
Hi Guillaume,
The problem is that the document id is indexed as a STRING field by
default, which is not matched by your sort type LONG.
To make it work, your options are:
* Use SortField.Type.STRING to match the field's type
* Index your id field as numeric field (which I suppose makes more
sens
And if I sort by creationDate desc, the sort is OK. So I really think
there's something related to sorting on the id.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
And the sort is different after each reindex.
On Wed, Sep 23, 2015 at 11:05 PM, Guillaume Smet
wrote:
> On Wed, Sep 23, 2015 at 10:59 PM, Gunnar Morling
> wrote:
>
>> What is the exact behaviour you observe?
>>
>
> Oh, yeah, forgot the most important :).
>
> The results are completely unsorted.
On Wed, Sep 23, 2015 at 10:59 PM, Gunnar Morling
wrote:
> What is the exact behaviour you observe?
>
Oh, yeah, forgot the most important :).
The results are completely unsorted. It should be sorted by id desc and I
have:
26687
26941
27034
27244
27235
28414
28327
What is the exact behaviour you observe?
2015-09-23 22:53 GMT+02:00 Guillaume Smet :
> Hi,
>
> After the upgrade to Search 5.5 (I think we skipped 5.4 on this app), I
> have a weird behavior when I sort by id.
>
> My id is a Long just indexed with @DocumentId:
> @Id
> @DocumentId
> pri