Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-3863 Add missing option to DistanceSortOptionsStep
- Loading branch information
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
...ava/org/hibernate/search/engine/search/sort/dsl/DistanceSortMissingValueBehaviorStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Hibernate Search, full-text search for your domain model | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.search.engine.search.sort.dsl; | ||
|
||
import org.hibernate.search.engine.spatial.GeoPoint; | ||
|
||
/** | ||
* The step in a sort definition where the behavior on missing values can be set. | ||
* | ||
* @param <N> The type of the next step (returned by {@link DistanceSortMissingValueBehaviorStep#first()}, for example). | ||
* | ||
* @author Emmanuel Bernard emmanuel@hibernate.org | ||
*/ | ||
public interface DistanceSortMissingValueBehaviorStep<N> { | ||
|
||
/** | ||
* Put documents with missing values last in the sorting. | ||
* | ||
* <p>This instruction is independent of whether the sort is being ascending | ||
* or descending. | ||
* | ||
* @return The next step. | ||
*/ | ||
N last(); | ||
|
||
/** | ||
* Put documents with missing values first in the sorting. | ||
* | ||
* <p>This instruction is independent of whether the sort is being ascending | ||
* or descending. | ||
* | ||
* @return The next step. | ||
*/ | ||
N first(); | ||
|
||
/** | ||
* When documents are missing a value on the sort field, use the given value instead. | ||
* | ||
* @param value The value to use as a default when a document is missing a value on the sort field. | ||
* @return The next step. | ||
*/ | ||
N use(GeoPoint value); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters