Exemple #1
0
        private void BuildModel(long docId, long keyId, AnalyzedString tokens)
        {
            var ix = GetOrCreateIndex(keyId);

            foreach (var vector in tokens.Embeddings)
            {
                if (!VectorNodeWriter.Add(ix, new VectorNode(vector, docId), Similarity.Term))
                {
                    _merges++;
                }
            }
        }
Exemple #2
0
        public void Put(long docId, long keyId, string value)
        {
            AnalyzedString tokens = _tokenizer.Tokenize(value);

            BuildModel(docId, keyId, tokens);
        }