Hi,
when:
- I use the excerpt in my view
- In the index=>processors=>Highlight=>Exclude fields from excerpt: I have not checked Field A and Field B
- I have checked Field C (so it´s excluded)
- I search for "searchterm" which is in Field A and not in Field B
- Field A AND Field B is displayed in the excerpt
Expected behaviour:
Do not display fields in my excerpt that does not match with "searchterm".
Furtheron:
When Field B has multiple values - for example when Field B is the linkname in a referenced entity, and there are 4 entities attached, the excerpt will show all 4 linknames. Only thing needed is
- a match of "searchterm" in one of the referenced linknames
- or a match of searchtearm in Field A
But maybe: Someone wants to display a field in the excerpt as a standard output - even when this field has no match. If this was the intention it´s not working fine also. Because:
When I do not have ANY matches of "searchterm" in one of the unchecked fields:
Those unchecked fields are not displayed.
For example: "searchterm" is in Field C : the excerpt is empty.
If someone wants to have a standard output of a given field, which has no match, he should put this field into his view or use replacement patterns in the rewrite results section of the views excerpt field.
I try to make a figure:
in SOLR, this is how my linkname field is stored (In Our example "Field A"). The linkname field is part of the node attached via entity reference field:
( Entity Reference Field) » Content » Call to action » Link text (title_3)
"tm_X3b_en_X2d_SG_title_3":
["CTA1BCDshowertest",
"Learn more CTA2",
"Learn more CTA3a",
"CTA 5a"],
When I search for "showertest", the excerpt displays:
CTA1BCDshowertest … Learn more CTA2 … Learn more CTA3a … CTA 5a … Learn more CTA4a … Learn more CTA4b … CTA 6a … CTA7a … CTA8a …
The italic part is coming from my Field B:
( Entity Reference Field) » Content » (Field in the attached node) » Paragraph » Call to action » Link text (title_5)
"tm_X3b_en_X2d_SG_title_5":
["Learn more CTA4a",
"Learn more CTA4b",
"CTA 6a",
"CTA7a",
"CTA8a"],
And when I have a match in Field C - in my case it´s the summary field: The excerpt is empty.
(Summary (field_summary)):
"tm_X3b_en_X2d_SG_field_summary":["Teaser Showertest ...stripped text..."],
Here´s the spell of this node:
spell":["Teaser Showertest ...stripped text...",
...stripped other fields...
"CTA1BCDshowertest",
"Learn more CTA2",
"Learn more CTA3a",
"CTA 5a",
"Learn more CTA4a",
"Learn more CTA4b",
"CTA 6a",
"CTA7a",
"CTA8a"],
How can i make it, that only the values are in the excerpt which have matched "showertest" ?
(the excerpt should display only CTA1BCDshowertest)
Greetings,
Lars
P.S.: I hope i am in the right module and it´s not a search_api or views issue. If it so, forgive me and move to them :-D