Skip to content

Commit

Permalink
Add Beta annotation for DocumentFrequency record.
Browse files Browse the repository at this point in the history
  • Loading branch information
toregge committed Jul 2, 2024
1 parent f532c7e commit c700bab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion container-search/abi-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
"public final int hashCode()",
"public final boolean equals(java.lang.Object)",
"public long frequency()",
"public long corpusSize()"
"public long count()"
],
"fields" : [ ]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.query;

/*
* The expected number of documents matching the item given a corpus of
import com.yahoo.api.annotations.Beta;

/**
* The expected number of documents matching an item given a corpus of
* multiple documents. This is the raw data used to calculate variants
* of idf, used as significance.
*
* @param frequency The number of documents in which an item occurs
* @param count The total number of documents in the corpus
*/
public record DocumentFrequency(long frequency, long corpusSize) {
@Beta
public record DocumentFrequency(long frequency, long count) {
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.query;
import com.yahoo.api.annotations.Beta;

import java.util.Optional;

Expand Down Expand Up @@ -46,6 +47,9 @@ public interface TaggableItem {
void setExplicitSignificance(boolean significance);
double getSignificance();

@Beta
void setDocumentFrequency(DocumentFrequency documentFrequency);

@Beta
Optional<DocumentFrequency> getDocumentFrequency();
}

0 comments on commit c700bab

Please sign in to comment.