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:
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.
- Alphabetic
- By Inheritance
- SearchResult
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val authors: List[AuthorName]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- 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.
- val description: Option[DescriptionText]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val imageUrl: Option[Uri]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val number: SearchResultNumber
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val published: Option[OffsetDateTime]
- val publisher: List[PublisherName]
- val publishingDetails: List[PublishingDetails]
- val searchEngines: List[SearchEngineName]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val title: Option[TitleString]
- val url: Option[Uri]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])