Package ch.rswk.meta.engine
Record Class LuceneService.SearchResult
java.lang.Object
java.lang.Record
ch.rswk.meta.engine.LuceneService.SearchResult
- Enclosing class:
LuceneService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSearchResult
(String cursor, List<org.apache.lucene.document.Document> docs, long totalHits) Creates an instance of aSearchResult
record class. -
Method Summary
Modifier and TypeMethodDescriptioncursor()
Returns the value of thecursor
record component.List
<org.apache.lucene.document.Document> docs()
Returns the value of thedocs
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetotalHits
record component.
-
Field Details
-
cursor
The field for thecursor
record component. -
docs
The field for thedocs
record component. -
totalHits
private final long totalHitsThe field for thetotalHits
record component.
-
-
Constructor Details
-
SearchResult
Creates an instance of aSearchResult
record class.- Parameters:
cursor
- the value for thecursor
record componentdocs
- the value for thedocs
record componenttotalHits
- the value for thetotalHits
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
cursor
Returns the value of thecursor
record component.- Returns:
- the value of the
cursor
record component
-
docs
Returns the value of thedocs
record component.- Returns:
- the value of the
docs
record component
-
totalHits
public long totalHits()Returns the value of thetotalHits
record component.- Returns:
- the value of the
totalHits
record component
-