Hi,

Implementing highlighting with *SolrJ* does not return results in the proper
order while I "page" through results. This not seems to be a problem with
the RESTful API.

// ...
query.setQuery("text");
/*
    The problem is when I set start to get different "pages",
    the results returned by getHighlighting() are disordered.
*/
query.setStart(0);
query.setSort("score", SolrQuery.ORDER.desc);
query.setIncludeScore(true);

query.setHighlight(true);
query.addHightlightField("content");
// ...

Take the example of a simple index with a field named content and field's
values like:
Document 1
Document 2
Document 3
etc.

With the results returned by SolrDocumentList and with the RESTful API, I
can paginate in the normal way, and the results remain ordered. This is not
the case when I get results from getHighlighting().



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrJ-getHighlighting-does-not-return-results-in-order-tp4326218.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to