> ## 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-doxygen">
  <div id="a4c7a7acb22b8793a57a5c9162f7e063e" />

  <h2 className="memtitle"><span className="permalink"><a href="#a4c7a7acb22b8793a57a5c9162f7e063e">◆ </a></span>filterByString() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> gpudb::GPUdb::filterByString </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringRequest">FilterByStringRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Calculates which objects from a table or view match a string expression for the given string columns. </p>
      <p>Setting <a className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">case\_sensitive</a> can modify case sensitivity in matching for all modes except <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a>. For <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a2fbef5ccbedc476c240e83e1350a898a" />

  <h2 className="memtitle"><span className="permalink"><a href="#a2fbef5ccbedc476c240e83e1350a898a">◆ </a></span>filterByString() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> & gpudb::GPUdb::filterByString </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringRequest">FilterByStringRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Calculates which objects from a table or view match a string expression for the given string columns. </p>
      <p>Setting <a className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">case\_sensitive</a> can modify case sensitivity in matching for all modes except <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a>. For <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a950c256cf401850944e641ab760f9e5e" />

  <h2 className="memtitle"><span className="permalink"><a href="#a950c256cf401850944e641ab760f9e5e">◆ </a></span>filterByString() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> gpudb::GPUdb::filterByString </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">viewName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">expression</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">mode</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">columnNames</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Calculates which objects from a table or view match a string expression for the given string columns. </p>
      <p>Setting <a className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">case\_sensitive</a> can modify case sensitivity in matching for all modes except <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a>. For <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>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. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">viewName</td>
              <td>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 ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">expression</td>
              <td>The expression with which to filter the table. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">mode</td>

              <td>
                The string filtering mode to apply. See below for details. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">filter\_by\_string\_search</a>: Full text search query with wildcards and boolean operators. Note that for this mode, no column can be specified in <span className="em arg">columnNames</span>; all string columns of the table that have text search enabled will be searched. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a23c0c11ad0967c707d790d64e71e20af">filter\_by\_string\_equals</a>: Exact whole-string match (accelerated). </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#af8dfaafd43b3cb9dbca90fc60f3667ba">filter\_by\_string\_contains</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 className="el" href="/content/api/cpp/namespacegpudb#a04336e34ac48efe030a77e76e5eddbd4">filter\_by\_string\_starts\_with</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 className="el" href="/content/api/cpp/namespacegpudb#afe5b76dc543d431780210b16e600746d">filter\_by\_string\_regex</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 className="el" href="/content/api/cpp/namespacegpudb#a9edc529ee2ab64b80cd35da27f61668e">filter\_by\_string\_search\_stats</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 <span className="em arg">column\_names</span> to contain exactly one column with text search enabled. The <span className="em arg">view\_name</span> field is ignored — this mode does not produce a result table. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">columnNames</td>
              <td>List of columns on which to apply the filter. Ignored for <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a5ab071ec4ac6b35cdf6abe4b3ee59ce0">filter\_by\_string\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em arg">viewName</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cpp/namespacegpudb#aadd6c9450b2af70fc3a835c9be725e60">qualified\_view\_name</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a11440f1ad8db563a96ddd47a7a1d9c33">filter\_by\_string\_collection\_name</a>: \[DEPRECATED–please specify the containing schema for the view as part of <span className="em arg">viewName</span> and use <a className="el" href="#a33d9a0a8e738d14b688f9f869f9640ad">createSchema</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 className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">filter\_by\_string\_case\_sensitive</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">false</a> then string filtering will ignore case. Does not apply to <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="abe5f7d81e26d9ae26b172fe2670eb41f" />

  <h2 className="memtitle"><span className="permalink"><a href="#abe5f7d81e26d9ae26b172fe2670eb41f">◆ </a></span>filterByString() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> & gpudb::GPUdb::filterByString </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">viewName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">expression</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">mode</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">columnNames</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">FilterByStringResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Calculates which objects from a table or view match a string expression for the given string columns. </p>
      <p>Setting <a className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">case\_sensitive</a> can modify case sensitivity in matching for all modes except <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a>. For <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode details and limitations, see <a href="/content/concepts/full_text_search/" target="_top">Full Text Search</a>.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>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. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">viewName</td>
              <td>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 ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">expression</td>
              <td>The expression with which to filter the table. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">mode</td>

              <td>
                The string filtering mode to apply. See below for details. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">filter\_by\_string\_search</a>: Full text search query with wildcards and boolean operators. Note that for this mode, no column can be specified in <span className="em arg">columnNames</span>; all string columns of the table that have text search enabled will be searched. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a23c0c11ad0967c707d790d64e71e20af">filter\_by\_string\_equals</a>: Exact whole-string match (accelerated). </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#af8dfaafd43b3cb9dbca90fc60f3667ba">filter\_by\_string\_contains</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 className="el" href="/content/api/cpp/namespacegpudb#a04336e34ac48efe030a77e76e5eddbd4">filter\_by\_string\_starts\_with</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 className="el" href="/content/api/cpp/namespacegpudb#afe5b76dc543d431780210b16e600746d">filter\_by\_string\_regex</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 className="el" href="/content/api/cpp/namespacegpudb#a9edc529ee2ab64b80cd35da27f61668e">filter\_by\_string\_search\_stats</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 <span className="em arg">column\_names</span> to contain exactly one column with text search enabled. The <span className="em arg">view\_name</span> field is ignored — this mode does not produce a result table. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">columnNames</td>
              <td>List of columns on which to apply the filter. Ignored for <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a5ab071ec4ac6b35cdf6abe4b3ee59ce0">filter\_by\_string\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em arg">viewName</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cpp/namespacegpudb#aadd6c9450b2af70fc3a835c9be725e60">qualified\_view\_name</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a11440f1ad8db563a96ddd47a7a1d9c33">filter\_by\_string\_collection\_name</a>: \[DEPRECATED–please specify the containing schema for the view as part of <span className="em arg">viewName</span> and use <a className="el" href="#a33d9a0a8e738d14b688f9f869f9640ad">createSchema</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 className="el" href="/content/api/cpp/namespacegpudb#a03974abe744afd69b0a93a332c3c06a0">filter\_by\_string\_case\_sensitive</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">false</a> then string filtering will ignore case. Does not apply to <a className="el" href="/content/api/cpp/namespacegpudb#a344e39d3272af6d6cd26efd95370abe1">search</a> mode. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7f21e1256d545666c9face38129ff449">filter\_by\_string\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#af3080edf9fd7312c560898325f468a2e">filter\_by\_string\_true</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1FilterByStringResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
