The IndexHits
interface exposes scoring so that the index can communicate scores for the hits.
Note that the result is not sorted by the score unless you explicitly specify that.
See Section 14.11.2, “Sorting” for how to sort by score.
IndexHits<Node> hits = movies.query( "title", "The*" ); for ( Node movie : hits ) { System.out.println( movie.getProperty( "title" ) + " " + hits.currentScore() ); }
Copyright © 2012 Neo Technology