<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr Search .NET SDK on Dapr Docs</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/</link><description>Recent content in Dapr Search .NET SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/index.xml" rel="self" type="application/rss+xml"/><item><title>How to: Index and search documents with the Dapr .NET SDK</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/dotnet-search-howto/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/dotnet-search-howto/</guid><description>&lt;p>Use &lt;code>DaprSearchClient&lt;/code> to index JSON documents and run full-text queries through a Dapr search component. In this guide, you will configure a local store, create an index, write and search typed documents, and delete them.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a> and an &lt;a href="https://docs.dapr.io/getting-started/install-dapr-selfhost/">initialized Dapr environment&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://dotnet.microsoft.com/download/dotnet/8.0">.NET 8&lt;/a>, &lt;a href="https://dotnet.microsoft.com/download/dotnet/9.0">.NET 9&lt;/a>, &lt;a href="https://dotnet.microsoft.com/download/dotnet/10.0">.NET 10&lt;/a>, or &lt;a href="https://dotnet.microsoft.com/download/dotnet/11.0">.NET 11&lt;/a>&lt;/li>
&lt;li>Dapr runtime 1.19 or later with Search support&lt;/li>
&lt;li>The &lt;a href="https://www.nuget.org/packages/Dapr.Search">Dapr.Search&lt;/a> NuGet package, version 1.19.0 or later&lt;/li>
&lt;/ul>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">.NET framework support&lt;/h4>

 Be advised that .NET 8 and .NET 9 reach end of support in November 2026. Support for both will be dropped
in Dapr v1.20; only .NET 10 and .NET 11 will be supported through the end of 2027.

&lt;/div>

&lt;p>Install the package in an ASP.NET Core project:&lt;/p></description></item><item><title>Dapr Search client</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/dotnet-search-client-usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/dotnet-search-client-usage/</guid><description>&lt;p>&lt;code>DaprSearchClient&lt;/code> in &lt;code>Dapr.Search&lt;/code> implements the alpha Search API through gRPC. Use .NET SDK 1.19.0 or later with a Dapr runtime and component that support Search. See the &lt;a href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/">overview&lt;/a> for release requirements and the &lt;a href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-search/dotnet-search-howto/">how-to&lt;/a> for a complete document lifecycle.&lt;/p>
&lt;h2 id="client-lifetime-and-configuration">Client lifetime and configuration&lt;/h2>
&lt;p>Reuse a long-lived client rather than creating one per operation. Dependency injection registers a singleton by default and owns its disposal:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-csharp" data-lang="csharp">&lt;span class="line">&lt;span class="cl">&lt;span class="k">using&lt;/span> &lt;span class="nn">Dapr.Search.Extensions&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">builder&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">Services&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">AddDaprSearchClient&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="n">serviceProvider&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">clientBuilder&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">=&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">clientBuilder&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">UseGrpcEndpoint&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;http://localhost:50001&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">});&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The callback can resolve configuration or other services through &lt;code>serviceProvider&lt;/code>. Use the optional &lt;code>lifetime&lt;/code> argument to choose another &lt;code>ServiceLifetime&lt;/code> when required.&lt;/p></description></item></channel></rss>