content_indexer v0.2.5 ContentIndexer.TfIdf.DocTerms.Impl

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

Link to this section Summary

Functions

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

Resets the document counts

Retrieves the document state

Link to this section Functions

Link to this function add_document_term_count(document_name, term, count, document_map)

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

## Example

iex> ContentIndexer.TfIdf.DocTerms.Impl.add_document_term_count("test_file_1.md", "bread", 23)
      {"test_file_1.md", "bread, 23}
Link to this function get_document_term_count(document_name, term, document_map)

retrieves the document term count

## Example

iex> ContentIndexer.TfIdf.DocTerms.Impl.get_document_term_count("test_file_1.md", "bread")
      23

Resets the document counts

## Example

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

Retrieves the document state

## Example

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