hansken_extraction_plugin.api.trace_searcher

This module contains the definition of a trace searcher.

Classes

SearchScope(value)

Scope to describe the search context for TraceSearcher.search calls.

TraceSearcher()

This class can be used to search for traces, using the search method.

class SearchScope(value)[source]

Bases: str, Enum

Scope to describe the search context for TraceSearcher.search calls.

image = 'image'
project = 'project'
class TraceSearcher[source]

Bases: object

This class can be used to search for traces, using the search method.

abstract search(query: str, count: int | None = None, scope: str | ~hansken_extraction_plugin.api.trace_searcher.SearchScope = SearchScope.image, start: int = 0, sort: list[~hansken_extraction_plugin.api.search_sort_option.SearchSortOption] = [<hansken_extraction_plugin.api.search_sort_option.SearchSortOption object>]) SearchResult[source]

Search for indexed traces in Hansken using provided query returning at most count results.

Parameters:
  • query – HQL-query used for searching

  • start – Starting index of traces to return

  • count – Maximum number of traces to return

  • scope – Select search scope: ‘image’ to search only search for other traces within the image of the trace that is being processed, or ‘project’ to search in the scope of the full project (either Scope- enum value can be used, or the str-values directly).

  • sort – The fields and directions to sort on

Returns:

SearchResult containing found traces