Can Express objects be searchable in the site index?

Permalink
First off, kudos to the concrete5 team for version 8! Express is looking to be a very exciting and useful feature.

I'm curious about whether Express objects can be searched in the site index. For example, consider a movie review website made up of 4000+ movie reviews. I'm seeing Express can be used to represent these movie reviews, but if these movie reviews also need to be searchable in the site index, is it possible in Express, or do we need to write our own codes/blocks to achieve that?

MrRonbot
View Replies:
andrew replied on at Permalink Reply
andrew
Thanks! Currently it's going to require custom code. We don't even have express searching at a basic level working yet, although since it's attribute based that should be easy to do.
mjamil4it replied on at Permalink Reply
This can be achieved by an overriding express object list block controller if you are using a list express list block.

My express object name is a product and attribute handle i want to search is product_name, this is how I override the getSearchABleContent function:
public function getSearchableContent()
    {
        $search = PHP_EOL;
        if ($block = $this->getBlockObject()) {
            if(strpos($block->getBlockFilename(), 'product') > -1) {
                $items = $this->getResults();
                foreach($items as $item) {
                    $category = $item->getEntry();
                    $search .= $category->getProductName() . PHP_EOL;
                }
            }
        }
        return $search;
    }