message: don't introduce attribute or relationships keys that weren't present in the input
diff: @@ -45,10 +45,13 @@ module.exports = class DocumentContext {
  if (field.id === 'id' || field.id === 'type' || field.isRelationship) {
  continue;
  }
  + if (contentType.computedFields.has(field.id) ||
  + (jsonapiDoc.attributes && jsonapiDoc.attributes.hasOwnProperty(field.id))) {
  let value = await userModel.getField(field.id);
  await this._buildAttribute(field, value, pristineDocOut, searchDocOut);
  }
  }
  + }
  async _buildAttribute(field, value, pristineDocOut, searchDocOut) {
  // Write our value into the search doc
  @@ -74,10 +77,13 @@ module.exports = class DocumentContext {
  if (!field.isRelationship) {
  continue;
  }
  + if (contentType.computedFields.has(field.id) ||
  + (jsonapiDoc.relationships && jsonapiDoc.relationships.hasOwnProperty(field.id))) {
  let value = { data: await userModel.getField(field.id) };
  await this._buildRelationship(field, value, pristineDocOut, searchDocOut, searchTree, depth);
  }
  }
  + }
  async _buildRelationship(field, value, pristineDocOut, searchDocOut, searchTree, depth) {
  if (!value || !value.hasOwnProperty('data')) {
  