Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does java.sql.Clob supported in searchable Domain class field? #55

Open
shineway opened this issue Mar 31, 2013 · 1 comment
Open

Does java.sql.Clob supported in searchable Domain class field? #55

shineway opened this issue Mar 31, 2013 · 1 comment

Comments

@shineway
Copy link

import java.sql.Clob

Class A {
String f1
Clob fClob

static searchable = {
    only = ['f1', ' fClob']   
}

}

when indexing, got following error:

[elasticsearch[Fontanelle][bulk][T#7]] ERROR index.IndexRequestQueue - Failed bulk item: MapperParsingException[object mapping for [es.A] tried to parse as object, but got EOF, has a concrete value been provided to it?]

any suggestion?

@mstein
Copy link
Owner

mstein commented Apr 3, 2013

The plugin does not provide native support for Clob object, and I don't know if ElasticSearch itself has a default mapping for this type.
When the type is unknown, it is just parsed and sent to ES as a plain object, which may not work as you expect.

You may have to convert it into a String field using a converter.

static searchable = {
    fClob converter:FClobConverter
}

With FClobConverter being an implementation of java.beans.PropertyEditorSupport (simple implementation example there : https://github.com/mstein/elasticsearch-grails-plugin/blob/master/grails-app/utils/test/RoleConverter.groovy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants