Prev |  | Next

## 5.9. Scores

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 5.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 © 2011 Neo Technology

Prev | Up | Next
| Home |