sulu / SuluArticleBundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system
MIT License
52 stars 77 forks source link

Add content fields to ArticleViewDocument #558

Closed Prokyonn closed 3 years ago

Prokyonn commented 3 years ago
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT

What's in this PR?

Adds an additional contentField to the ArticleViewDocument. The contentField holds all properties, which are tagged with sulu.search.field in the xml configuration.

Thus the developer can easily index custom fields and use them e.g. in a SearchController.

Why?

Some projects need more data in the index to create a desired search behaviour.

Example Usage

        <property name="text" type="text_editor" mandatory="true">
            <meta>
                <title lang="en">Text</title>
                <title lang="de">Text</title>
            </meta>

            <tag name="sulu.search.field"/>
        </property>

To Do

wachterjohannes commented 3 years ago

@Prokyonn can you add a documentation section about this tag?