content_indexer v0.2.0 ContentIndexer.Services.ListCheckerWorker

genserver based approach to the ListCheckerWorker Summary

ListCheckerWorker is the OTP actor that handles the actual ContentIndexerService.list_contains to check
whether a given word is contained in a list of tokens

Due to the fact that we have a very large dataset - potentially millions - a process is spawned for each

Basic Useage

A method is called by the server for each list of tokens and returns a result based on whether a given word was found in the list or not

Link to this section Summary

Functions

Checks with a worker whether an item is contained in the list The function response just indicates that the process was kicked

Link to this section Functions

Link to this function list(index, word, tokens)

Checks with a worker whether an item is contained in the list The function response just indicates that the process was kicked

## Parameters

- index: Integer representing the index of the list
- word: String - word to be found
- tokens: List of tokens to be searched

## Example

iex> ContentIndexer.Services.ListCheckerWorker.list(1, "bread", ["bread", "butter", "jam"])
      {:ok, :ok}