content_indexer v0.2.5 ContentIndexer.TfIdf.DocCounts.Impl

Summary functions used by the ContentIndexer.TfIdf.DocCounts.Server

Link to this section Summary

Functions

If the document exists update the count, if it’s a new document add it and it’s respective term_count

Retrieves the current term_count for this document or nil if not in the map

Resets the document counts

Returns the document counts state

Link to this section Functions

Link to this function add_new_document(document_name, term_count, document_map)

If the document exists update the count, if it’s a new document add it and it’s respective term_count

## Example

iex> ContentIndexer.TfIdf.DocCounts.Impl.add_document("test_file_1.md", 23)
      {"test_file_1.md", 23}
Link to this function find_term_count(document_name, document_map)

Retrieves the current term_count for this document or nil if not in the map

## Example

iex> ContentIndexer.TfIdf.DocCounts.Impl.document_term_count("test_file_1.md")
    {"test_file_1.md", 23}

Resets the document counts

## Example

iex> ContentIndexer.TfIdf.DocCounts.Impl.reset()
  %{}

Returns the document counts state

## Example

iex> ContentIndexer.TfIdf.DocCounts.Impl.state()
  %{}