Magek Framework
    Preparing search index...

    Class Searcher<TObject, TSingleResult, TContainer>

    This class represents a search intended to be run by any search provider. They way you use it is by setting filters on the properties of the object you want to search and then run it. Check the documentation on the individual methods to know more about how to do so.

    Type Parameters

    • TObject
    • TSingleResult extends SingleResultType<TObject> = TObject
    • TContainer extends ContainerType = any[]
    Index

    Constructors

    Methods

    • Adds a filter for the search. For example: If you want to search for people whose age is greater than 30 and their height is between 1.80m and 2.00m, you would do:

      searcher.filter({
      age: { gt: 30 },
      height: { gte: 1.8, lte: 2 }
      }).search()

      Parameters

      Returns this