FullTextFilter Component

The FullTextFilter component functions similarly to the propertyFilter component but performs full-text search across indexed entity fields.

XML Element

fullTextFilter

Java Class

io.jmix.searchflowui.component.FullTextFilter

Attributes

id - alignSelf - ariaLabel - ariaLabelledBy - autoApply - classNames - colspan - css - dataLoader - defaultValue - enabled - errorMessage - focusShortcut - height - helperText - justifySelf - label - labelPosition - labelVisible - labelWidth - maxHeight - maxWidth - minHeight - minWidth - parameterName - readOnly - required - requiredMessage - searchStrategy - tabIndex - themeNames - visible - width

Handlers

AttachEvent - BlurEvent - ComponentValueChangeEvent - DetachEvent - FocusEvent - validator

Elements

validator

Basics

To add the component on the view, use Jmix Studio.

Click Add Component in the actions panel, then find the Full-text filter item and double-click it.

create full text filter component

Since the dataLoader attribute is required, Studio will display a dialog to select a data loader. Choose the appropriate data loader and click OK.

The new fullTextFilter element will be added both in the Jmix UI structure panel and in the XML descriptor. You can configure standard attributes (id, height, width, etc.) just like any other UI component.

<data>
    <collection id="ordersDc"
                class="com.company.demo.entity.Order">
        <loader id="ordersDl"
                readOnly="true">
            <query>
                <![CDATA[select e from Order_ e]]>
            </query>
        </loader>
        <fetchPlan extends="_base">
            <property name="customer"
                      fetchPlan="_base"/>
        </fetchPlan>
    </collection>
</data>
<facets>
    <dataLoadCoordinator auto="true"/>
</facets>
<layout>
    <search:fullTextFilter dataLoader="ordersDl"
                           autoApply="true"/>
    <dataGrid id="ordersDataGrid"
              width="100%"
              dataContainer="ordersDc">
        <columns>
            <column property="number"/>
            <column property="date"/>
            <column property="amount"/>
            <column property="product"/>
            <column property="customer"/>
        </columns>
    </dataGrid>
</layout>

If you don’t use the view designer, declare the search namespace in your view’s XML descriptor manually:

<view xmlns="http://jmix.io/schema/flowui/view"
      xmlns:search="http://jmix.io/schema/search/ui"
      title="msg://searchView.title">

The FullTextFilter component operates as follows:

  1. Performs a full-text search to find entity identifiers matching the search criteria.

  2. Appends a condition containing these identifiers to the associated dataLoader.

  3. When a DataGrid (or other listing component) is linked to this data loader, it displays only those records that match the full-text search criteria.

The full-text condition combines with any other filters applied to the data loader, providing refined result sets.

Validation

To check values entered into the fullTextFilter component, you can use a validator in a nested validators element.

The following predefined validators are available for fullTextFilter:

XML Element

validators

elements

custom - decimalMax - decimalMin - digits - doubleMax - doubleMin - email - future - futureOrPresent - max - min - negative - negativeOrZero - notBlank - notEmpty - notNull - past - pastOrPresent - positive - positiveOrZero - regexp - size

Attributes

Common attributes serve the same purpose for all components. The following attributes are specific to fullTextFilter:

Name Description Default

autoApply

When set to true, the FullTextFilter component automatically applies itself to the DataLoader upon changes to its value.

-

dataLoader

dataLoader is a required attribute. It sets a data loader related to the current fullTextFilter.

-

searchStrategy

Determines the search strategy applied. See Search Strategies.

anyTermAnyField