You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Diamantino Campos <di...@xpand-it.com> on 2016/04/22 12:17:30 UTC

Lucene Query Time JOIN - sort by parent

Hi,


I've been trying to use the JoinUtil.createJoinQuery method in order to get results.


I've  Parent-> Childs relation and I want to return childs result to users.



Query joinQuery = JoinUtil.createJoinQuery(idField, toField , parentQuery, searcher);
TopDocs result = searcher.search(joinQuery, trFilter, Integer.MAX_VALUE, sort);


I'm quite stuck right now because I want to provide our users the ability to sort by any of the columns, from parent or childs but I've noticed that the sort is only made with childs fields.

Am I doing something wrong?


Thank you for you time.


Best regards,

Diamantino Campos

Diamantino Campos

E-mail:   diamantino.campos@xpand-it.com<ma...@xpand-it.com>
[x]     Xpand IT | Delivering Innovation and Technology
Phone: (+351) 21 896 71 50
Fax: (+351) 21 896 71 51
Site: www.xpand-it.com<http://www.xpand-it.com/>
[Facebook]<http://www.xpand-it.com/facebook> [Linkedin] <http://www.xpand-it.com/linkedin>  [Twitter] <http://www.xpand-it.com/twitter>  [Youtube] <http://www.xpand-it.com/youtube>