I've been tearing my hair out for a couple of days now trying to sort out an issue between the Bean module and Search API. I need to index Beans with their Type as one of the indexed fields, but every time I try and add Type from 'Related Fields', the field wouldn't show up in the Search API index interface.

I managed to find out why - Type is of data type 'bean_type' but no such data type exists, and Search API therefore doesn't recognise it. 'bean_type' is not defined or built on in the Bean module as a data type or an entity type, and is only defined as a piece of meta information in the BeanMetadataController. I would argue this separate data type doesn't need to exist as it is a stereotypical token field. For example, a (Content) Type field on a node is of type token.

Therefore I've changed the field to a token field in the file that governs entityPropertyInfo of a Bean, and on preliminary tests everything is working as expected - and the integration with Search API seems to work great! But as I have not got a broad range of tests for this and I am not a contributor of the module, I don't know if this will have knock-on effects with anything else unforeseen.

Submitted the patch for your approval :)

Comments

steve.stotter’s picture

Status: Active » Needs review

Changed to 'Needs Review' as provided the patch above.

Status: Needs review » Needs work

The last submitted patch, token-as-type-entity-property-D7.patch, failed testing.

steve.stotter’s picture

Version: 7.x-1.7 » 7.x-1.8
StatusFileSize
new1.47 KB

Ah that patch was for 7.x-1.7, updated now for 7.x-1.8.

steve.stotter’s picture

Status: Needs work » Needs review

And status again.

Status: Needs review » Needs work

The last submitted patch, 3: token-as-type-entity-property-D7-18.patch, failed testing.

steve.stotter’s picture

Status: Needs work » Needs review
StatusFileSize
new529 bytes

Re-rolling patch. My git spat out absolute paths rather than relative (hopefully fixed now otherwise I give up...).

indytechcook’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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