0
0
bleve/mapping
Marty Schoch 9359a69ee5 add support for mapping to recognize/use TextMarshaler interface
Sometimes you have structs which contain data which isn't
exported, or for which the correct data to index isn't just the
contents of it's exported fields.  In these cases your struct
can implement TextMarshaler to return a suitable text
representation.

Previously bleve did not recognize this interface and do anything
to use it.  Now, if the field containing such a struct is
explicitly mapped as "text" and if the struct (or pointer to it)
implements TextMarshaler, we index a text field with the
contents returned by MarshalText().

For backwards compatibilty, dynamic mappings will never use
this feature, and will continue to traverse into the struct
and index the exported fields directly.

fixes #281
2017-05-18 15:08:33 -04:00
..
analysis.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
document.go add support for mapping to recognize/use TextMarshaler interface 2017-05-18 15:08:33 -04:00
examples_test.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
field.go add experimental support for indexing/query geo points 2017-03-24 17:22:21 -07:00
index.go fix comment in wrong format 2016-10-02 11:10:05 -04:00
mapping_test.go add support for mapping to recognize/use TextMarshaler interface 2017-05-18 15:08:33 -04:00
mapping.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
reflect_test.go fix type identification when object indexed is pointer to struct 2016-12-08 08:07:38 -05:00
reflect.go fix type identification when object indexed is pointer to struct 2016-12-08 08:07:38 -05:00