O'Reilly logo

Hibernate Search by Example by Steve Perkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sorting

By default, search results come back in the order of their "relevance". In other words, they are ranked by the degree to which they match the query. We will discuss this further over the next two chapters, and learn how to adjust these relevance calculations.

However, we have the option to change the sorting to some other criteria altogether. In typical situations, you might sort by a date or numeric field, or by a string field in an alphabetical order. In all versions of the VAPORware Marketplace application going forward, users may now sort their search results by the app name.

To sort on a field, special consideration is required when that field is mapped for Lucene indexing. Normally when a string field is indexed, a default analyzer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required