0

so we have a kind of normal dynamic sulu 1.6 content structure:

<template>
  <properties>

     <section name="highlight">
            <properties>
                <property name="title" type="text_line" mandatory="true">
                    <meta>
                        <title lang="en">Title</title>
                        <title lang="de">Titel</title>
                    </meta>
                    <params>
                        <param name="headline" value="true"/>
                    </params>

                    <tag name="sulu.rlp.part"/>
                </property>

                <property name="headline" type="text_line" mandatory="false">
                    <meta>
                        <title lang="en">Alternative Content Headline</title>
                        <title lang="de">Alternative Inhalts Überschrift</title>
                    </meta>
                </property>
     </section>

     <block name="mainContent" default-type="article" colspan="8">
        <types>
           <!-- some types -->
           <type name="article">
            <meta>
                <title lang="de">Artikel</title>
                <title lang="en">Article</title>
            </meta>

            <properties>
                <property name="headline" type="text_line"/>
                <property name="teaser" type="text_editor"/>
                <property name="content" type="text_editor"/>
                <property name="mode" type="single_select">
                    <params>
                        <param name="values" type="collection">
                            <param name="simple">
                                <meta>
                                    <title lang="de">Einfach</title>
                                    <title lang="en">Simple</title>
                                </meta>
                            </param>
                            <param name="collapsible">
                                <meta>
                                    <title lang="de">Ausklappbar</title>
                                    <title lang="en">Collapsible</title>
                                </meta>
                            </param>
                        </param>
                    </params>
                </property>
                <property name="image" type="media_selection"/>
            </properties>
        </type>

        </types>

     </block>


  </properties>
</template>

If I search now, sulu finds perfectly matches of the tile, but non hidden in the dynamic block content.

I checked out http://docs.sulu.io/en/latest/bundles/search.html and https://massivesearchbundle.readthedocs.io/en/latest/introduction.html but it is not clear to me, how to make this happen. Is there a way for the massive search bundle to also build an index over free text fields?

I would be interested in taking content from properties > block[name=mainContent] > types > type[name=article] > property[name=content] into account (and also property[name=teaser] of course). It can be 0 - n occurences in a page thou.

Thx a lot for any hint on this :)
Andreas

Andreas
  • 1,691
  • 1
  • 15
  • 34

1 Answers1

2

Inside blocks you should be able to add a field to the search with example:

<property name="article" type="text_editor">
    <meta>
        <title lang="en">Article</title>
    </meta>
    <tag name="sulu.search.field" />
</property>

See also http://docs.sulu.io/en/latest/book/templates.html#search

Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42
  • Looks like this is doing the trick indeed! I had to manually remove all the indexes in var/indexes but that did the trick :) – Andreas Oct 01 '19 at 21:27
  • 1
    you can use `bin/adminconsole massive:search:purge && bin/websiteconsole massive:search:purge` to remove both indexes and then run `bin/adminconsole massive:search:reindex && bin/websiteconsole massive:search:reindex` to reindex them. But sometimes when using the zend adapter the index get corrupt and need a hard remove as you did. – Alexander Schranz Oct 02 '19 at 10:34