Summary
Creates a lookup from a sequence of documents and the values of a specified metadata key
and compares the keys by using a specified comparer.
If a document does not contain the specified metadata key, it is not included in the result set.
Syntax
public static ILookup<TKey, IDocument> ToLookup<TKey>(this IEnumerable<IDocument> documents, string keyMetadataKey, IEqualityComparer<TKey> comparer)
Type Parameters
| Name |
Description |
| TKey |
The type of the key. |
Parameters
| Name |
Type |
Description |
| documents |
IEnumerable<IDocument> |
The documents. |
| keyMetadataKey |
string |
The key metadata key. |
| comparer |
IEqualityComparer<TKey> |
The comparer. |
Return Value
| Type |
Description |
| ILookup<TKey, IDocument> |
A lookup. |