Interface HitLocations

All Known Implementing Classes:
DefaultHitLocations

@Uncommitted
@Public
public interface HitLocations
Represents the locations of a search result hit. locations show where a given term occurs inside of a given field.
Since:
2.3.0
Author:
Simon Baslé, Michael Nitschinger
  • Method Details

    • add

      add a location and allow method chaining
    • get

      List<HitLocation> get​(String field)
      list all locations for a given field (any term)
    • get

      List<HitLocation> get​(String field, String term)
      list all locations for a given field and term
    • getAll

      List<HitLocation> getAll()
      list all locations (any field, any term)
    • count

      long count()
      size of all()
    • fields

      List<String> fields()
      list the fields in this location
    • termsFor

      List<String> termsFor​(String field)
      list the terms for a given field
    • terms

      Set<String> terms()
      list all terms in this locations, considering all fields (so a set)