Problem/Motivation

The views integration of Search API currently "doubles up" the available fields in views if relationships are used. As far as I know this is due the fact that Search API uses a specilized table but names the fields the same way as views does.
This leads to a really painfull user expirience when working with relationships (Choose both available fields, add them & remove then the one not needed).

Proposed resolution

I'd propose to do something like fago proposed in this comment: #1266036-88: Add generic Views entity tables with fields and relationships

So maybe we should just fix the names of the search api index fields to be named differently? E.g. "Indexed node: Title"?

The attached patch adds a the prefix "Indexed " to the table group - this leads to nice field label prefixes and even a specialized group in the views field selection.

Remaining tasks

Review patch in #3.
Decide what group label to use.

User interface changes

Labels of the fields provided by Search API will change in views.

API changes

none.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

das-peter’s picture

Issue tags: +dvcs11

Added Views sprint tag.

drunken monkey’s picture

Category: bug » task
Status: Needs review » Needs work

This needs a t() call.

Also, I'm really not sure whether this won't be confusing in a different way. „Indexed“ might carry some invalid implications which might confuse users. And I'm probably the worst judge of that, as I of course know what goes on there, which can't be expected of users.
Maybe not using the entity type at all, but just „Search result“ might be even better?

Would be great to get some more input to this.

das-peter’s picture

Added t() and switched to simply name it to „Search result“.
Frankly speaking I don't give the used prefix that much priority as long as there's a way to distinguish between what I've to click.

drunken monkey’s picture

I've asked fago for his opinion, he usually also has some ideas about such UX issues.
And I understand, being able to distinguish the two at all is of course most important.

fago’s picture

Imho both options would be a good improvement. Still, having the entity type included probably makes sense, so the users always has a clear context (oh, yes it's a node.. :D).

Thus, I'd vote for "Indexed %entity-type".

drunken monkey’s picture

Status: Needs work » Needs review
FileSize
1.52 KB

Thanks for the input, Wolfgang, then let's do it that way!
The attached patch also contains a small note in the README.

das-peter’s picture

Status: Needs review » Reviewed & tested by the community

Readme addition looks good and also with the naming I'm absolutely happy.
From my point of view this deserves RTBC.

fago’s picture

Looks good to me too!

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Committed.
Thanks, you two!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.