final case class SearchResult(authors: List[AuthorName], description: Option[DescriptionText], imageUrl: Option[Uri], published: Option[OffsetDateTime], publisher: List[PublisherName], publishingDetails: List[PublishingDetails], searchEngines: List[SearchEngineName], title: Option[TitleString], url: Option[Uri], number: SearchResultNumber) extends Product with Serializable

A container for the data we collect for each search result.

A search result implements a semigroup which allows us to combine several results into one using the cats syntax a

|+| b |+| c. This is useful to combine results which are equal but come from different search engines. While all fields are combined using common semigroups there are exceptions. Notably the following fields are not combined but overridden by their "right" counterpart in the equation of that is defined:

  1. imageUrl 2. published 3. url 4. number

Because combining datetimes or urls in general doesn't make sense.

authors

A list of author names (e.g. writers of a blog post or paper) if feasible which may be empty.

description

A textual description of the content which usually equals the teaser text shown by search engines.

imageUrl

An optional URL pointing to an image related to the result.

published

An optional publishing date and time.

publisher

A list of publisher names (e.g. publishing houses for books or papers) which might be empty.

publishingDetails

A list of details about the published item e.g. a science magazine issue with page numbers or an ISBN.

searchEngines

A list of search engine names which returned this result.

title

A short summary of the search result (i.e. a title).

url

The URL pointing to the actual result which is usually a website.

number

The "number" represents the position of it in the returned result set of a search engine and thus reflects the "importance", the lower the better.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchResult
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SearchResult(authors: List[AuthorName], description: Option[DescriptionText], imageUrl: Option[Uri], published: Option[OffsetDateTime], publisher: List[PublisherName], publishingDetails: List[PublishingDetails], searchEngines: List[SearchEngineName], title: Option[TitleString], url: Option[Uri], number: SearchResultNumber)

    authors

    A list of author names (e.g. writers of a blog post or paper) if feasible which may be empty.

    description

    A textual description of the content which usually equals the teaser text shown by search engines.

    imageUrl

    An optional URL pointing to an image related to the result.

    published

    An optional publishing date and time.

    publisher

    A list of publisher names (e.g. publishing houses for books or papers) which might be empty.

    publishingDetails

    A list of details about the published item e.g. a science magazine issue with page numbers or an ISBN.

    searchEngines

    A list of search engine names which returned this result.

    title

    A short summary of the search result (i.e. a title).

    url

    The URL pointing to the actual result which is usually a website.

    number

    The "number" represents the position of it in the returned result set of a search engine and thus reflects the "importance", the lower the better.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val authors: List[AuthorName]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def combine(y: SearchResult): SearchResult

    Combine the search result with the given one.

    Combine the search result with the given one.

    The general rule of thumb is to never override existing values except if they are empty.

    TODO Move to a typeclass if it has laws that can be checked.

    y

    Another search result.

    returns

    The combined version of this and the given search result.

  8. val description: Option[DescriptionText]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. val imageUrl: Option[Uri]
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. val number: SearchResultNumber
  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. val published: Option[OffsetDateTime]
  19. val publisher: List[PublisherName]
  20. val publishingDetails: List[PublishingDetails]
  21. val searchEngines: List[SearchEngineName]
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. val title: Option[TitleString]
  24. val url: Option[Uri]
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped