Hi all,

I am unable to show multiple values of a field for a View based on a Index created with Search API.
I created a simple scenario to explain.

I have a content type "Negozio" which is referencing another content type "Risorsa", using the Entity Reference module (each Negozio can have multiple Risorsa associated). I created 2 Negozio and 4 Risorsa with this configuration:
Negozio1 (ID 1) is referencing: Risorsa2 (ID 2), Risorsa3 (ID 3), Risorsa4 (ID 4)
Negozio5 (ID 5) is referencing: Risorsa6 (ID 6)

Then I created a Index in Search API called "Negozi", which is based on "Negozio" content type.
When adding fields (see picture [Search API and Views - Index Fields.jpg]) I only add the "Node ID" field and with ADD RELATED FIELDS functionality I add "Risorse » Node ID".
The index is created correctly and in the database I can see the associations in the search_api_db_negozi_field_risorse_nid table ([Search API and Views - Referenced NIDs.JPG]).

Then I created a View based on the Negozi Index.
I added the 2 fields from the index as we can see in picture [Search API and Views - Fields in the View.jpg].
But in the output of the view only the first "Risorse » Node ID" for each Negozio is shown ([Search API and Views - Output of the View.jpg]).

Is this a bug?
How is it choosing which one to be shown? Is it simply the first?
How can I see the other two missing Risorse (ID 3 and ID 4) in the view?

Important note: the "Risorse » Node ID" is recognized to be Multi-valued field as we can see the note "1" highlighted by the arrow in the picture [Search API and Views - Index Fields.jpg].

Any suggestion or hint on this is really appreciated.

Thanks in advance.

Comments

drupaljunior created an issue.

drupaljunior’s picture

Hi!
Does anybody have a hint or suggestion? Is this a bug?
Thanks for any explanation.

drupaljunior’s picture

Hi all,
any idea?
Thanks

drupaljunior’s picture

Hi, anyone with an explanation or a reference to something already discussed?
Thanks!