> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# filterByString

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="filterByString(com.gpudb.protocol.FilterByStringRequest)">
        <h3>filterByString</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/FilterByStringResponse" title="class in com.gpudb.protocol">FilterByStringResponse</a></span> <span className="element-name">filterByString</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest" title="class in com.gpudb.protocol">FilterByStringRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Calculates which objects from a table or view match a string expression for the given string columns. Setting <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#CASE_SENSITIVE"><code>CASE\_SENSITIVE</code></a> can modify case sensitivity in matching for all modes except <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a>. For <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/FilterByStringResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="filterByString(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.List,java.util.Map)">
        <h3>filterByString</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/FilterByStringResponse" title="class in com.gpudb.protocol">FilterByStringResponse</a></span> <span className="element-name">filterByString</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> tableName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> viewName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> expression, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> mode, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> columnNames, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Calculates which objects from a table or view match a string expression for the given string columns. Setting <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#CASE_SENSITIVE"><code>CASE\_SENSITIVE</code></a> can modify case sensitivity in matching for all modes except <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a>. For <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the table on which the filter operation will be performed, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table or view.</div>
          <div className="dd"><code>viewName</code> - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. Must not be an already existing table or view. The default value is ''.</div>
          <div className="dd"><code>expression</code> - The expression with which to filter the table.</div>

          <div className="dd">
            <code>mode</code> - The string filtering mode to apply. See below for details. Supported values:

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a>: Full text search query with wildcards and boolean operators. Note that for this mode, no column can be specified in <code>columnNames</code>; all string columns of the table that have text search enabled will be searched. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#EQUALS"><code>EQUALS</code></a>: Exact whole-string match (accelerated). </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#CONTAINS"><code>CONTAINS</code></a>: Partial substring match (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#STARTS_WITH"><code>STARTS\_WITH</code></a>: Strings that start with the given expression (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#REGEX"><code>REGEX</code></a>: Full regular expression search (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH_STATS"><code>SEARCH\_STATS</code></a>: Cross-shard BM25 corpus statistics for one (column, query) pair. Returns the merged BM25 statistics (max\_doc, doc\_count, sum\_total\_term\_freq, per-term doc\_freq / total\_term\_freq) needed by callers that score documents themselves (e.g. text\_match\_bm25\_global SQL function pre-pass). Requires <code> COLUMN\_NAMES</code> to contain exactly one column with text search enabled. The <code>VIEW\_NAME</code> field is ignored — this mode does not produce a result table. </li>
            </ul>
          </div>

          <div className="dd"><code>columnNames</code> - List of columns on which to apply the filter. Ignored for <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a> mode.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#CREATE_TEMP_TABLE"><code>CREATE\_TEMP\_TABLE</code></a>: If <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#TRUE"><code>TRUE</code></a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <code>viewName</code>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a href="/content/api/java/com/gpudb/protocol/FilterByStringResponse.Info#QUALIFIED_VIEW_NAME"><code>QUALIFIED\_VIEW\_NAME</code></a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#COLLECTION_NAME"><code>COLLECTION\_NAME</code></a>: \[DEPRECATED--please specify the containing schema for the view as part of <code>viewName</code> and use <a href="#createSchema(java.lang.String,java.util.Map)"><code>createSchema</code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema is non-existent, it will be automatically created. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#CASE_SENSITIVE"><code>CASE\_SENSITIVE</code></a>: If <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#FALSE"><code>FALSE</code></a> then string filtering will ignore case. Does not apply to <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Mode#SEARCH"><code>SEARCH</code></a> mode. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/FilterByStringRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/FilterByStringResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
