Skip to content

Commit 390a728

Browse files
authored
Update README.md
1 parent 43a14b1 commit 390a728

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ The index takes full advantage of the scalability of Azure Table Storage by part
2020

2121
## Usage
2222
### Create a single index
23-
```charp
23+
```C#
2424
_fullNameIndex = new TrieSearch<Customer>("trieUnitTestFullNameIndex", "UseDevelopmentStorage=true", c => c.Id);
2525
```
2626
Here we set the name of the index (which translates to an Azure Table Storage table name), connection string, and the identifier, which translates to the row key in Azure Table Storage.
2727

2828
### Creating a multi index
29-
```charp
29+
```C#
3030
_multiIndexSearch = new MultiIndexTrieSearch<Customer>(new Dictionary<ITrieSearch<Customer>, Func<Customer, string>>
3131
{
3232
[_fullNameIndex] = c => c.FirstName + " " + c.LastName,
@@ -39,7 +39,7 @@ Here we provide the multi index with a dictionary. The dictionary keys are your
3939
### The de-dupe function
4040
Currently you need to tell the multi index how to de-dupe the search results. A future release may do this automatically for you, but for now you'll need to provide one. Here is an example:
4141

42-
```charp
42+
```C#
4343
_dedupeFunction = customers =>
4444
{
4545
var uniqueIds = customers.Select(c => c.Id).Distinct();
@@ -53,12 +53,12 @@ _dedupeFunction = customers =>
5353
};
5454
```
5555
### Querying a single index
56-
```csharp
56+
```C#
5757
var results = await _fullNameIndex.FindAsync("j");
5858
```
5959
### Querying a multi index
6060
Querying a multi index is similar to querying the single index, but it requires the de-fupe function
61-
```csharp
61+
```C#
6262
var results = await _multiIndexSearch.FindAsync("j", _dedupeFunction);
6363
```
6464
## Index Benchmarks (Adding entities to the index)

0 commit comments

Comments
 (0)