Hi guys, I have been struggling with the sort fields on 2 different entities. Any help would be appreciated.
Here is my structures:
In Entity A: @Id @DocumentId @Basic(optional=false) @SequenceGenerator(...) @Field(index=Index.UN_TOKENIZED) private Long a;
//a link to entity B @JoinColumn(name="B",referencedColumnName="B") @ManyToOne @IndexedEmbedded private B b;
In Entity B: @Field(index=Index.UN_TOKENIZED) private Long b;
I want the sort order to be ordered by B.b followed by A.a.
In my searchDAO, I code this sort.
Sort sort = new Sort(new SortField("B.b",SortField.LONG), new SortField("A.a",SortField.LONG)); searchLuceneQuery.setSort(sort); ....
The result doesn't give what i need to see to order by B.b followed by A.a.
Please help!
|