Using Hibernate Search to Evaluate Results

Is it possible that a sleep search could sort the result according to the best match after it got the search result from the database

+3
source share
2 answers

Lucene has a sort function (which by default matters).

Search in sleep mode provides this functionality (FullTextQuery.sort). if you do not want the default behavior, you can pass your own sort object.

Sort sort = new Sort(new SortField("name"));
searchQuery.setSort(sort);
List results = searchQuery.list();

In your case, the default sort should be sufficient.

+3
source

Hibernate Search ( doc_180), Lucene.

, (, , People, , , ),

  • , (. @Boost @DynamicBoost)
  • , org.apache.lucene.search.Similarity(. ). , 1, .
+2

Source: https://habr.com/ru/post/1788767/


All Articles