Package com.complexible.stardog.api.search

# Interface Searcher

public interface Searcher

Interface for conducting full text searches against a Stardog database via the Waldo Semantic Search engine.

Since:
  0.6.5
Version:
  6.0
Author:
  Michael Grove

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Searcher`
  `in(Resource... theGraphs)`
  Specify the named graphs to search over, by default, only the unnamed (default) graph is searched.
  `Searcher`
  `limit(int theLimit)`
  Specify the maximum number of results to return to the search.
  `Searcher`
  `offset(int theOffset)`
  Specify the offset into the query results to return to the search
  `Searcher`
  `query(String theQuery)`
  Specify the query string for the search.
  `SearchResults`
  `search()`
  Execute the search
  `Searcher`
  `semantic(boolean theSemantic)`
  Specify semantic mode
  `Searcher`
  `threshold(double theThreshold)`
  Specify a minimum value for the scores of the results of the search.

- ## Method Details

  - ### in

    Searcher in(Resource... theGraphs)
    Specify the named graphs to search over, by default, only the unnamed (default) graph is searched.
    Parameters:
      `theGraphs` - the graphs to search
    Returns:
      this object
    See Also:
      - `Contexts`

  - ### limit

    Searcher limit(int theLimit)
    Specify the maximum number of results to return to the search. The default limit is 50.
    Parameters:
      `theLimit` - the result limit
    Returns:
      this object

  - ### offset

    Searcher offset(int theOffset)
    Specify the offset into the query results to return to the search
    Parameters:
      `theOffset` - the offset
    Returns:
      this object

  - ### query

    Searcher query(String theQuery)
    Specify the query string for the search. This supports the standard Lucene query syntax
    Parameters:
      `theQuery` - the query string
    Returns:
      this object

  - ### threshold

    Searcher threshold(double theThreshold)
    Specify a minimum value for the scores of the results of the search. Default is no minimum, all results up to the limit will be returned regardless of score
    Parameters:
      `theThreshold` - the minimum score for results
    Returns:
      this object

  - ### semantic

    Searcher semantic(boolean theSemantic)
    Specify semantic mode
    Parameters:
      `theSemantic` - the semantic mode flag
    Returns:
      this object

  - ### search

    SearchResults search() throws StardogException
    Execute the search
    Returns:
      the search results
    Throws:
      `StardogException` - if there was an error while searching.