[Neos] Elasticsearch: Index the presence of an ImageVariant Property

Aske Ertmann aske at moc.net
Fri Jan 16 09:01:47 CET 2015


Hi Daniel

The indexing bit seems incorrect, storyHeaderImage is not a direct property of the node but inside the “properties” array. So either ‘${q(node).property(“storyHeaderImage") ? "set" : "missing")}’ or  '${node.properties.storyHeaderImage ? "set" : "missing”}’ should work.

Hope it helps.

Cheers,
Aske

> On 16 Jan 2015, at 08:11, Daniel Lienert <daniel at lienert.cc> wrote:
> 
> Hi all, 
> I have a kind of blog entry with a property "storyHeaderImage" which is of type ImageVariant. I'd like to teaser blogEntries with an headerImage set within a slider and so I try to index the presence of this property in elasticsearch. 
> Image properties are not indexed by default, so I configured the indexing within the blogEntry like this:
> 
> ---
> 
>   'storyHeaderImage':
>     type: 'TYPO3\Media\Domain\Model\ImageVariant'
>     ui:
>       label: 'Story Header Image'
>       reloadIfChanged: true
>       inspector:
>         group: 'storyProperties'
> 
>   '_storyHeaderImage':
>     search:
>       elasticSearchMapping:
>         type: string
>         include_in_all: false
>       indexing: '${(node.storyHeaderImage ? "set" : "missing")}'
> 
> ---
> 
> Gist with correct indentation: https://gist.github.com/daniellienert/d7ea2a9fcb04b21d9298
> 
> But this is not working. Every entry is indexed with "missing" although an image is set.
> 
> Can anyone give me a hint?
> 
> Thanks in advance,
> Daniel
> -- 
> TYPO3 related: http://daniel.lienert.cc | http://yag-gallery.de
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos



More information about the Neos mailing list