- Issue created by @aaronpinero
- π©πͺGermany a.dmitriiev
Actually I was never using tokens inside the indexed field before, so thank you for the report. I will try to check what is the problem here with token.
- π©πͺGermany a.dmitriiev
I have tried the custom value field for the search index, I also tried the date field as in your example, and it works without problems for me. Maybe because I use Drupal 10.3.0, Search API 8.x-1.35 and 1.x-dev version of Search API Decoupled. The token I used is
[node:news_date:date:html_year]
- π©πͺGermany a.dmitriiev
Please give more information about your setup, like version of Search API. I have realized right now, that token is not actually used when the result is displayed, the token is used on index time. So Search API extracts the value from your token when the content is being indexed, and then when the search results are being displayed, there is no transformation of token anymore, because in search index the value for this token is already stored, not the token itself.
- πΊπΈUnited States aaronpinero
I upgraded my instance to Drupal 10.3.1 and PHP 8.3 and the problem I was seeing went away. I guess whatever it was is fixed in the latest version of Drupal.
- Status changed to Fixed
5 months ago 10:08am 9 July 2024 - π©πͺGermany a.dmitriiev
Good to hear, that it is now working for you. Though it is still interesting what was wrong in 10.2.7 about it.
Automatically closed - issue fixed for 2 weeks with no activity.