Hello,

I noticed geofield stores a geom column in binary format in mysql, and mongodb dies on it saying it is non utf.

Can I exclude this field from migration, or specify MongoBinData ?

Comments

giorgio79’s picture

Title: Excluding a non utf8 field from field storage on mongo? (Geofield geom column seems to break migration) » Geofield geom (binary mysql) column breaks migration

I managed to exclude geom column from migration, and now migration runs fine! So, it is definitely geofield's geom column that is incompatible. Couple solutions:

1. detect mysql column type, if it is binary, store it as binary
2. exclude column from migration?
3. manually specify as MongoBinData?

Possibly related issue at Geofield queue #1811682: "geom" binary data breaks Services JSON - unable to encode value to JSON -- FOLLOW UP

marcingy’s picture

Status: Active » Fixed

You can define which fields to migrate in

$migrate_fields = variable_get('mongodb_migrate_fields', array());

so once you use drush_mongodb_migrate_prepare you could remove the field from the list

giorgio79’s picture

It would be preferable to define the field as MongoBinData, so everything is in mongo. Any tips for that? :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

lguiotguiog

giorgio79’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes
Status: Closed (fixed) » Active

Maybe for 8x? :)

giorgio79’s picture

Title: Geofield geom (binary mysql) column breaks migration » Ability to specify mongoblobdata for fields

For a sample implementation Search API Solr offers field types for storing in Solr for each field. Check the index settings admin/config/search/search_api/index/xxxxx/fields

giorgio79’s picture

Title: Ability to specify mongoblobdata for fields » Ability to specify Mongo Bin Data for fields
marcingy’s picture

Status: Active » Closed (won't fix)

Nope

giorgio79’s picture