public class

FtsOptions

extends java.lang.Object

 java.lang.Object

↳androidx.room.FtsOptions

Overview

Available option values that can be used with Fts3 & Fts4.

Summary

Fields
public static final java.lang.StringTOKENIZER_ICU

The name of a tokenizer implemented by the ICU library.

public static final java.lang.StringTOKENIZER_PORTER

The name of the tokenizer based on the Porter Stemming Algorithm.

public static final java.lang.StringTOKENIZER_SIMPLE

The name of the default tokenizer used on FTS tables.

public static final java.lang.StringTOKENIZER_UNICODE61

The name of the tokenizer that extends the FtsOptions.TOKENIZER_SIMPLE tokenizer according to rules in Unicode Version 6.1.

Methods
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String TOKENIZER_SIMPLE

The name of the default tokenizer used on FTS tables.

See also: Fts4.tokenizer(), Fts4.tokenizerArgs()

public static final java.lang.String TOKENIZER_PORTER

The name of the tokenizer based on the Porter Stemming Algorithm.

See also: Fts4.tokenizer(), Fts4.tokenizerArgs()

public static final java.lang.String TOKENIZER_ICU

The name of a tokenizer implemented by the ICU library.

Not available in certain Android builds (e.g. vendor).

See also: Fts4.tokenizer(), Fts4.tokenizerArgs()

public static final java.lang.String TOKENIZER_UNICODE61

The name of the tokenizer that extends the FtsOptions.TOKENIZER_SIMPLE tokenizer according to rules in Unicode Version 6.1.

See also: Fts4.tokenizer(), Fts4.tokenizerArgs()

Source

/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.room;

import androidx.annotation.RequiresApi;

/**
 * Available option values that can be used with {@link Fts3} & {@link Fts4}.
 */
public class FtsOptions {

    /**
     * The name of the default tokenizer used on FTS tables.
     *
     * @see Fts4#tokenizer()
     * @see Fts4#tokenizerArgs()
     */
    public static final String TOKENIZER_SIMPLE = "simple";

    /**
     * The name of the tokenizer based on the Porter Stemming Algorithm.
     *
     * @see Fts4#tokenizer()
     * @see Fts4#tokenizerArgs()
     */
    public static final String TOKENIZER_PORTER = "porter";

    /**
     * The name of a tokenizer implemented by the ICU library.
     * <p>
     * Not available in certain Android builds (e.g. vendor).
     *
     * @see Fts4#tokenizer()
     * @see Fts4#tokenizerArgs()
     */
    public static final String TOKENIZER_ICU = "icu";

    /**
     * The name of the tokenizer that extends the {@link #TOKENIZER_SIMPLE} tokenizer
     * according to rules in Unicode Version 6.1.
     *
     * @see Fts4#tokenizer()
     * @see Fts4#tokenizerArgs()
     */
    @RequiresApi(21)
    public static final String TOKENIZER_UNICODE61 = "unicode61";

    public enum MatchInfo {
        /**
         * Text matching info as version 3 of the extension module.
         *
         * @see Fts4#matchInfo()
         */
        FTS3,

        /**
         * Text matching info as version 4 of the extension module.
         *
         * @see Fts4#matchInfo()
         */
        FTS4
    }

    public enum Order {
        /**
         * Ascending returning order.
         *
         * @see Fts4#order()
         */
        ASC,

        /**
         * Descending returning order.
         *
         * @see Fts4#order()
         */
        DESC
    }

    private FtsOptions() {
    }
}