MB-66396: Index APIs for TermFrequencies and CentroidCardinalities#2207
MB-66396: Index APIs for TermFrequencies and CentroidCardinalities#2207abhinavdangeti merged 13 commits intomasterfrom
TermFrequencies and CentroidCardinalities#2207Conversation
87e97aa to
9a7378d
Compare
HighestFrequencyTerms and HighestCardinalityCentroids
HighestFrequencyTerms and HighestCardinalityCentroidsTermFrequencies and CentroidCardinalities
| return nil | ||
| } | ||
|
|
||
| func (i *IndexSnapshot) CentroidCardinalities(field string, limit int, descending bool) ( |
There was a problem hiding this comment.
Because this function is in snapshot_index_vr.go, the method wouldn't be included in IndexSnapshot if the vectors flag is turned off. So it wouldn't be an implementation of IndexInsightsReader anymore. Calls to TermFrequencies in index_impl.go would then fail because the code checks if the interface is implemented for the reader.
Basically, TermFrequencies would only work if it is compiled with vectors, is this intended?
There was a problem hiding this comment.
Ya it was intentional - because the insights project is meant for AI applications which will use this alongside vector data. This is just a start though, hoping to add more functions to the interface.
|
Thanks @CascadingRadium for the review so far, will push up a patch reflecting on your comments soon. |
0be6e44 to
cc615ca
Compare
Requires: - blevesearch/faiss#54 - blevesearch/bleve#2207 REST endpoints: - POST /api/index/{indexName}/insights - POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/insights - RequestBody: `{"field": "<fieldName>", "insight": "termFrequencies", "limit": 5, "descending": false}` `{"field": "<fieldName>", "insight": "centroidCardinalities", "limit": 5, "descending": true}` - Scatter gather request uses RESTful IndexClient(s). Change-Id: Ib9b7782e3fe80f0e6bf93905e5a5f1bb76d8fb71 Reviewed-on: https://review.couchbase.org/c/cbft/+/232479 Tested-by: Abhi Dangeti <abhinav@couchbase.com> Well-Formed: Build Bot <build@couchbase.com> Reviewed-by: Rahul Rampure <rahul.rampure@couchbase.com>
Requires:
IndexInsightsReaderbleve_index_api#71