-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-3319 WIP: DRAFT: IDEA: TEST: Type-safe field references
- Loading branch information
1 parent
f3bb0ec
commit e5c26f9
Showing
35 changed files
with
1,371 additions
and
90 deletions.
There are no files selected for viewing
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
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
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
19 changes: 19 additions & 0 deletions
19
.../java/org/hibernate/search/engine/search/predicate/dsl/KnnPredicateVectorGenericStep.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,19 @@ | ||
/* | ||
* 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.predicate.dsl; | ||
|
||
/** | ||
* The step in a "knn" predicate definition where the vector to match is defined. | ||
*/ | ||
public interface KnnPredicateVectorGenericStep<T> { | ||
/** | ||
* @param vector The vector from which to compute the distance to vectors in the indexed field. | ||
* @return The next step in the knn predicate DSL. | ||
*/ | ||
KnnPredicateOptionsStep matching(T vector); | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
.../org/hibernate/search/engine/search/predicate/dsl/MatchPredicateFieldMoreGenericStep.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,55 @@ | ||
/* | ||
* 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.predicate.dsl; | ||
|
||
/** | ||
* The step in a "match" predicate definition where the value to match can be set | ||
* (see the superinterface {@link MatchPredicateMatchingStep}), | ||
* or optional parameters for the last targeted field(s) can be set, | ||
* or more target fields can be added. | ||
* | ||
* @param <S> The "self" type (the actual exposed type of this step). | ||
* @param <N> The type of the next step. | ||
* @param <T> The type of the match value. | ||
* @param <V> The type representing the fields. | ||
*/ | ||
public interface MatchPredicateFieldMoreGenericStep< | ||
S extends MatchPredicateFieldMoreGenericStep<?, N, T, V>, | ||
N extends MatchPredicateOptionsStep<?>, | ||
T, | ||
V> | ||
extends MatchPredicateMatchingGenericStep<N, T>, MultiFieldPredicateFieldBoostStep<S> { | ||
|
||
/** | ||
* Target the given field in the match predicate, | ||
* as an alternative to the already-targeted fields. | ||
* <p> | ||
* See {@link MatchPredicateFieldStep#field(String)} for more information about targeting fields. | ||
* | ||
* @param field The field with a <a href="SearchPredicateFactory.html#field-paths">path</a> to the index field | ||
* to apply the predicate on. | ||
* @return The next step. | ||
* | ||
* @see MatchPredicateFieldStep#field(String) | ||
*/ | ||
S field(V field); | ||
|
||
/** | ||
* Target the given fields in the match predicate, | ||
* as an alternative to the already-targeted fields. | ||
* <p> | ||
* See {@link MatchPredicateFieldStep#fields(String...)} for more information about targeting fields. | ||
* | ||
* @param fieldPaths The fields with <a href="SearchPredicateFactory.html#field-paths">paths</a> to the index fields | ||
* to apply the predicate on. | ||
* @return The next step. | ||
* | ||
* @see MatchPredicateFieldStep#fields(String...) | ||
*/ | ||
S fields(V... fieldPaths); | ||
|
||
} |
Oops, something went wrong.