DG3 has a build in free text search engine that can combine search in fields to one search and give the results in for of links to a view containing the information.

To set up the search you need a table that keeps record on created and updated times. If not, the full index will be recreated on each update.

Table The table we should use to create the index
Title The column that will be used in the result so indicate whats in the document
Content List of columns that should be used when creating the index
URL This is the URL that can be used to open the information indexed. You can use any template language tags and the livetext returned by the indexer for use when creating the index is viewdata.
Ex. /viewdocument/?BookPrefix=[{ viewdata.BookPrefix }]&ChapterPrefix=[{ viewdata.ChapterPrefix }]&PageSlug=[{ viewdata.PageSlug }]
Last update date
A column holding the date of last update for the record
Ex. derivation: if ( UpdatedDate = Current date , Current date , Current date )
Last update time A column holding the time of last update for the record
Ex. derivation: if ( UpdatedTime = Current time , Current time , Current time )
Created date A column holding the date of creation for the record
Ex. derivation: Current date
Created time A column holding the time of creation for the record
Ex. derivation: Current time
Filter This is a fixed filter that can be used to limit the records that are being added to the index

When you have filled in the fields and created the index, you can make a search by using a transfer.

Create a search transfer

Create a new transfer and select source type search engine. Set target to dataview. In this way you can use the transfer as a liveview in a page. This page will then take a url parameter as the search query.

Create a search result page

Then create the page that will show the search result. You will need at least one liveview with the result.

<div class="row">
<div class="col-md-12"><a href="[{ viewdata.url }]">[{ viewdata.title }]</a></div>
</div><br>

The code for the result.

search The query that is sent to the search engine
maxret The number of returned search results. The default is 20.

This is the supported query format, but you can as on all queries add the name of the running transfer as a prefix if you have conflicting names in any of you other queries. The format for this example will then be "dosearchall.search=blog". To get more than 20 results, use "dosearchall.search=blog&dosearchall.maxret=50" that will return 50. If you want more than 100, make sure to change the limit to the dataview as well.

Create a scheduled task to update index

To be able to update the index on the server, you will need to make a schedule with a update index task. You first create a schedule and inside the schedule you can create the task for searchindexrefresh. To generate the code for the task, you will need to at least do a rebuild local task.

The schedule

The task