Package lumis.portal.bigdata
Interface IDocumentPopularityProvider
-
- All Known Implementing Classes:
DummyDocumentPopularityProvider
,StandardDocumentPopularityProvider
@StableMinor(version="14.2", sinceVersion="11.1") public interface IDocumentPopularityProvider
Provides popularity for Big Datastandard documents
.- Since:
- 11.1.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IDocumentPopularityProvider.DocumentPopularityKey
Represents a key forpopularities map
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<IDocumentPopularityProvider.DocumentPopularityKey,Double>
calculateDocumentPopularities()
Returns a list of documents popularities.double
calculateDocumentPopularity(StandardDocument document)
Returns the popularity for the given document.
-
-
-
Method Detail
-
calculateDocumentPopularities
Map<IDocumentPopularityProvider.DocumentPopularityKey,Double> calculateDocumentPopularities() throws PortalException, TransactionRequiredException
Returns a list of documents popularities.
Each entry of the given map is consisted in: astandard document's item identifier
, used as the entry's key; and adouble
value, used as the document's popularity.
Both, key and value must not be null and the value must be a positivefinite
number.
A popularity between0
and1
decrease the score the document would have during a search. A popularity of1
does not alter the score the document would have during search. A popularity greater than1
increase the score the document would have during search.
The returned map must not be null.- Returns:
- a list of documents popularities.
- Throws:
TransactionRequiredException
- if there's no active transaction.PortalException
- if some error occur during calculation.- Since:
- 11.1.0
-
calculateDocumentPopularity
double calculateDocumentPopularity(StandardDocument document) throws PortalException, TransactionRequiredException, IllegalArgumentException
Returns the popularity for the given document. The returned value must be a positivefinite
number. A popularity between0
and1
decrease the score the document would have during a search. A popularity of1
does not alter the score the document would have during search. A popularity greater than1
increase the score the document would have during search.- Parameters:
document
- the document.- Returns:
- the popularity for the given document.
- Throws:
IllegalArgumentException
- if the given document isnull
.TransactionRequiredException
- if there's no active transaction.PortalException
- if some error occur during calculation.- Since:
- 11.1.0
-
-