Unavailable "completion" datatype for Elasticsearch

Description

Hi,

I was looking at the code in search of understanding how to use a field type: "completion", but I have not found a way to create a FieldBridge for this type, or maybe I'm not sure how to create this field.

https://github.com/hibernate/hibernate-search/blob/master/elasticsearch/src/main/java/org/hibernate/search/elasticsearch/schema/impl/model/DataType.java

I have identified that in the DataType.java class does not have the completion datatype and also does not have the IP, Token count and Nested datatype.

Field datatypes: https://www.elastic.co/guide/en/elasticsearch/reference/5.x/mapping-types.html

So I opened this issue to signal this point I identified.

Thank you

Environment

None

Activity

Show:
Yoann Rodière
September 4, 2017, 12:17 PM

Hello ,

Thanks for this report.

First, please note that the DataType enum you mentioned is in an implementation package: you should not use it.

Second, the Elasticsearch integration currently does not allow using any of the datatypes that are not supported in the Lucene integration. The main reason is that until now, we concentrated on getting the same level of feature coverage in the Elasticsearch integration as in the Lucene integration.
We are currently starting the work on the next major version of Hibernate Search (6), and we expect that version to be easier to configure for non-Lucene integrations, so we could introduce non-Lucene data types in that release. But I won't lie to you: it's highly unlikely to happen in the 5.x branch, mainly because the APIs are very Lucene-oriented, which makes it difficult to introduce Elasticsearch-specific concepts.

In the meantime, if you need completion features, you can achieve similar results with an index field whose analyzer includes an edgeNGram token filter.

Cheers,

Assignee

Unassigned

Reporter

Leandro Kersting de Freitas

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure