【发布时间】:2023-03-29 17:07:01
【问题描述】:
我正在按数据库中的日期时间字段订购 FOS elastica 搜索结果。
elastica.yml 在映射上设置了这个属性:
startsAt: { type: date, format: Y-m-d H:i:s }
但是在填充时我得到了这个:
[Elastica\Exception\ResponseException]
MapperParsingException[mapping [soccer]]; nested: IllegalArgumentException[Invalid format: [Y-m-d H:i:s]: Illegal pattern component: i]; nested: IllegalArgumentExcept
ion[Illegal pattern component: i];
如何指定正确的格式,以便我可以通过该日期时间字段搜索我的 elastica 结果?
【问题讨论】: