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
    in(Resource... theGraphs)
    Specify the named graphs to search over, by default, only the unnamed (default) graph is searched.
    limit(int theLimit)
    Specify the maximum number of results to return to the search.
    offset(int theOffset)
    Specify the offset into the query results to return to the search
    query(String theQuery)
    Specify the query string for the search.
    Execute the search
    semantic(boolean theSemantic)
    Specify semantic mode
    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:
    • 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

      Execute the search
      Returns:
      the search results
      Throws:
      StardogException - if there was an error while searching.