-
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-4950 Fail faster for older dialects not supporting vectors
- Loading branch information
1 parent
f22f4a8
commit a4d1449
Showing
20 changed files
with
222 additions
and
28 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
30 changes: 30 additions & 0 deletions
30
...nd/elasticsearch/types/dsl/provider/impl/Elasticsearch8IndexFieldTypeFactoryProvider.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,30 @@ | ||
/* | ||
* 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.backend.elasticsearch.types.dsl.provider.impl; | ||
|
||
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.Elasticsearch8VectorFieldTypeMappingContributor; | ||
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.ElasticsearchVectorFieldTypeMappingContributor; | ||
|
||
import com.google.gson.Gson; | ||
|
||
/** | ||
* The index field type factory provider for ES8.x. | ||
*/ | ||
public class Elasticsearch8IndexFieldTypeFactoryProvider extends AbstractIndexFieldTypeFactoryProvider { | ||
|
||
private final Elasticsearch8VectorFieldTypeMappingContributor vectorFieldTypeMappingContributor = | ||
new Elasticsearch8VectorFieldTypeMappingContributor(); | ||
|
||
public Elasticsearch8IndexFieldTypeFactoryProvider(Gson userFacingGson) { | ||
super( userFacingGson ); | ||
} | ||
|
||
@Override | ||
protected ElasticsearchVectorFieldTypeMappingContributor vectorFieldTypeMappingContributor() { | ||
return vectorFieldTypeMappingContributor; | ||
} | ||
} |
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
30 changes: 30 additions & 0 deletions
30
...ckend/elasticsearch/types/dsl/provider/impl/OpenSearch2IndexFieldTypeFactoryProvider.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,30 @@ | ||
/* | ||
* 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.backend.elasticsearch.types.dsl.provider.impl; | ||
|
||
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.ElasticsearchVectorFieldTypeMappingContributor; | ||
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.OpenSearch1VectorFieldTypeMappingContributor; | ||
|
||
import com.google.gson.Gson; | ||
|
||
/** | ||
* The index field type factory provider for OpenSearch 2.x. | ||
*/ | ||
public class OpenSearch2IndexFieldTypeFactoryProvider extends AbstractIndexFieldTypeFactoryProvider { | ||
|
||
private final OpenSearch1VectorFieldTypeMappingContributor vectorFieldTypeMappingContributor = | ||
new OpenSearch1VectorFieldTypeMappingContributor(); | ||
|
||
public OpenSearch2IndexFieldTypeFactoryProvider(Gson userFacingGson) { | ||
super( userFacingGson ); | ||
} | ||
|
||
@Override | ||
protected ElasticsearchVectorFieldTypeMappingContributor vectorFieldTypeMappingContributor() { | ||
return vectorFieldTypeMappingContributor; | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...backend/elasticsearch/validation/impl/Elasticsearch8PropertyMappingValidatorProvider.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,16 @@ | ||
/* | ||
* 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.backend.elasticsearch.validation.impl; | ||
|
||
import org.hibernate.search.backend.elasticsearch.lowlevel.index.mapping.impl.PropertyMapping; | ||
|
||
public class Elasticsearch8PropertyMappingValidatorProvider implements ElasticsearchPropertyMappingValidatorProvider { | ||
@Override | ||
public Validator<PropertyMapping> create() { | ||
return new PropertyMappingValidator.Elasticsearch8PropertyMappingValidator(); | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...ch/backend/elasticsearch/validation/impl/OpenSearch2PropertyMappingValidatorProvider.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,16 @@ | ||
/* | ||
* 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.backend.elasticsearch.validation.impl; | ||
|
||
import org.hibernate.search.backend.elasticsearch.lowlevel.index.mapping.impl.PropertyMapping; | ||
|
||
public class OpenSearch2PropertyMappingValidatorProvider implements ElasticsearchPropertyMappingValidatorProvider { | ||
@Override | ||
public Validator<PropertyMapping> create() { | ||
return new PropertyMappingValidator.OpenSearch2PropertyMappingValidator(); | ||
} | ||
} |
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
Oops, something went wrong.