public void AddDocumentToIndex(DocumentTokens documentTokens) { DocumentsById.Add(documentTokens.DocumentId, documentTokens.TokensByPosition .OrderBy(x => x.position) .Select(x => x.token) .ToList()); foreach (var(position, token) in documentTokens.TokensByPosition) { AddToken(token, documentTokens.DocumentId, position); } }
private List <string> GetTokens(DocumentTokens documentTokens) { return(documentTokens.TokensByPosition.Select(x => x.token).Distinct().ToList()); }
public void SetTokens(DocumentTokens titleTokens, DocumentTokens contentTokens) { TitleTokens = titleTokens; ContentTokens = contentTokens; }