id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
3,652
EVMVersion.h
ethereum_solidity/liblangutil/EVMVersion.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
5,122
C++
.h
142
33.612676
95
0.736279
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,653
DebugData.h
ethereum_solidity/liblangutil/DebugData.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,956
C++
.h
58
31.413793
76
0.767232
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,655
SourceLocation.h
ethereum_solidity/liblangutil/SourceLocation.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
4,248
C++
.h
116
34.284483
127
0.712929
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,656
Scanner.h
ethereum_solidity/liblangutil/Scanner.h
/* * This file is part of solidity. * * solidity is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * solidity is distributed in...
8,983
C++
.h
222
38.256757
111
0.76765
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,660
SMTLib2Parser.h
ethereum_solidity/libsmtutil/SMTLib2Parser.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
2,138
C++
.h
73
27.30137
106
0.766405
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,662
Exceptions.h
ethereum_solidity/libsmtutil/Exceptions.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
2,103
C++
.h
49
40.979592
118
0.782353
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,663
Helpers.h
ethereum_solidity/libsmtutil/Helpers.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,626
C++
.h
48
31.854167
86
0.727679
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,664
SMTLib2Context.h
ethereum_solidity/libsmtutil/SMTLib2Context.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
3,187
C++
.h
83
36.385542
101
0.769981
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,665
SMTLib2Interface.h
ethereum_solidity/libsmtutil/SMTLib2Interface.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
3,342
C++
.h
84
37.619048
120
0.776606
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,666
CHCSmtLib2Interface.h
ethereum_solidity/libsmtutil/CHCSmtLib2Interface.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
3,488
C++
.h
77
42.818182
108
0.786793
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,667
SolverInterface.h
ethereum_solidity/libsmtutil/SolverInterface.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
16,185
C++
.h
477
31.197065
121
0.683447
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,668
CHCSolverInterface.h
ethereum_solidity/libsmtutil/CHCSolverInterface.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,806
C++
.h
51
33.333333
97
0.775287
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,669
SMTPortfolio.h
ethereum_solidity/libsmtutil/SMTPortfolio.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
2,078
C++
.h
50
39.5
120
0.791729
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,670
BMCSolverInterface.h
ethereum_solidity/libsmtutil/BMCSolverInterface.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,570
C++
.h
37
40.405405
106
0.776169
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,673
Assembly.h
ethereum_solidity/libevmasm/Assembly.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
14,519
C++
.h
264
52.746212
154
0.760814
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,674
EVMAssemblyStack.h
ethereum_solidity/libevmasm/EVMAssemblyStack.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
3,543
C++
.h
69
49.246377
116
0.789336
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,675
Instruction.h
ethereum_solidity/libevmasm/Instruction.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
16,326
C++
.h
294
53.663265
149
0.615067
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,677
AbstractAssemblyStack.h
ethereum_solidity/libevmasm/AbstractAssemblyStack.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,780
C++
.h
38
44.842105
111
0.785052
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,682
Disassemble.h
ethereum_solidity/libevmasm/Disassemble.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
1,263
C++
.h
27
44.962963
143
0.786122
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,687
Inliner.h
ethereum_solidity/libevmasm/Inliner.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
2,897
C++
.h
72
38.263889
121
0.775329
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,691
AssemblyItem.h
ethereum_solidity/libevmasm/AssemblyItem.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
10,957
C++
.h
241
43.178423
163
0.745691
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,693
SemanticInformation.h
ethereum_solidity/libevmasm/SemanticInformation.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
5,115
C++
.h
105
46.580952
123
0.78743
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,694
libsolc.h
ethereum_solidity/libsolc/libsolc.h
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
3,955
C++
.h
86
44.639535
129
0.747276
ethereum/solidity
23,062
5,715
501
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,695
adi_tree_test.cpp
typesense_typesense/test/adi_tree_test.cpp
#include "adi_tree.h" #include <gtest/gtest.h> #include "logger.h" #include <fstream> class ADITreeTest : public ::testing::Test { protected: virtual void SetUp() { } virtual void TearDown() { } }; TEST_F(ADITreeTest, BasicOps) { adi_tree_t tree; // operations on fresh tree ASSERT_EQ(...
2,646
C++
.cpp
91
23.868132
112
0.595012
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,696
collection_optimized_faceting_test.cpp
typesense_typesense/test/collection_optimized_faceting_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionOptimizedFacetingTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_...
163,822
C++
.cpp
2,812
43.512091
146
0.490465
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,697
num_tree_test.cpp
typesense_typesense/test/num_tree_test.cpp
#include <gtest/gtest.h> #include <art.h> #include "num_tree.h" TEST(NumTreeTest, Searches) { num_tree_t tree; tree.insert(-1200, 0); tree.insert(-1750, 1); tree.insert(0, 2); tree.insert(100, 3); tree.insert(2000, 4); tree.insert(-1200, 5); tree.insert(100, 6); uint32_t* ids = nu...
4,395
C++
.cpp
141
25.595745
77
0.619172
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,698
collection_specific_test.cpp
typesense_typesense/test/collection_specific_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionSpecificTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance()...
133,557
C++
.cpp
2,309
46.778259
554
0.541324
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,699
auth_manager_test.cpp
typesense_typesense/test/auth_manager_test.cpp
#include <gtest/gtest.h> #include <stdlib.h> #include <iostream> #include <http_data.h> #include "auth_manager.h" #include "core_api.h" #include <collection_manager.h> static const size_t FUTURE_TS = 64723363199; class AuthManagerTest : public ::testing::Test { protected: Store *store; AuthManager auth_manage...
30,549
C++
.cpp
479
56.82881
257
0.669561
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,700
store_test.cpp
typesense_typesense/test/store_test.cpp
#include <gtest/gtest.h> #include <vector> #include <store.h> #include <string_utils.h> TEST(StoreTest, GetUpdatesSince) { std::string primary_store_path = "/tmp/typesense_test/primary_store_test"; LOG(INFO) << "Truncating and creating: " << primary_store_path; system(("rm -rf "+primary_store_path+" && mkd...
6,803
C++
.cpp
134
45.328358
124
0.668324
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,701
collection_nested_fields_test.cpp
typesense_typesense/test/collection_nested_fields_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionNestedFieldsTest : public ::testing::Test { protected: Store* store; CollectionManager& collectionManager = CollectionManager::get_instanc...
121,656
C++
.cpp
3,048
30.677493
177
0.5234
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,702
array_test.cpp
typesense_typesense/test/array_test.cpp
#include <gtest/gtest.h> #include "array.h" #include <vector> TEST(ArrayTest, Append) { array arr; int SIZE = 10 * 1000; EXPECT_EQ(arr.getLength(), 0); // First try inserting sorted ints for(int i=0; i < SIZE; i++) { arr.append(i); } EXPECT_EQ(arr.getLength(), SIZE); for(in...
3,298
C++
.cpp
105
25.619048
75
0.579581
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,703
geo_filtering_test.cpp
typesense_typesense/test/geo_filtering_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class GeoFilteringTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance(); ...
24,420
C++
.cpp
466
41.56867
119
0.537483
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,704
match_score_test.cpp
typesense_typesense/test/match_score_test.cpp
#include <chrono> #include <gtest/gtest.h> #include <match_score.h> #include "posting_list.h" #include <fstream> #define token_offsets_file_path (std::string(ROOT_DIR) + std::string("external/token_offsets/file/token_offsets.txt")).c_str() TEST(MatchTest, TokenOffsetsExceedWindowSize) { std::vector<token_position...
7,783
C++
.cpp
161
42.63354
126
0.664293
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,705
core_api_utils_test.cpp
typesense_typesense/test/core_api_utils_test.cpp
#include <gtest/gtest.h> #include "collection.h" #include <vector> #include <collection_manager.h> #include <core_api.h> #include <analytics_manager.h> #include "core_api_utils.h" #include "raft_server.h" #include "conversation_model_manager.h" #include "conversation_manager.h" class CoreAPIUtilsTest : public ::testin...
78,863
C++
.cpp
1,920
32.699479
146
0.575781
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,706
archive_utils_test.cpp
typesense_typesense/test/archive_utils_test.cpp
#include <gtest/gtest.h> #include "archive_utils.h" #include "tsconfig.h" #include <fstream> #include <cstdio> #include <filesystem> class ArchiveUtilsTest : public ::testing::Test { protected: void SetUp() override { temp_dir = std::filesystem::temp_directory_path() / "archive_utils_test"; std::fi...
4,062
C++
.cpp
79
46.56962
114
0.705778
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,707
collection_grouping_test.cpp
typesense_typesense/test/collection_grouping_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionGroupingTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance()...
63,595
C++
.cpp
1,057
49.115421
121
0.522733
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,708
topster_test.cpp
typesense_typesense/test/topster_test.cpp
#include <gtest/gtest.h> #include <index.h> #include "topster.h" #include "match_score.h" #include <fstream> TEST(TopsterTest, MaxIntValues) { Topster topster(5); struct { uint16_t query_index; uint64_t key; uint64_t match_score; int64_t primary_attr; int64_t secondary_...
6,775
C++
.cpp
192
27.739583
108
0.539003
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,709
tsconfig_test.cpp
typesense_typesense/test/tsconfig_test.cpp
#include <gtest/gtest.h> #include <stdlib.h> #include <iostream> #include <cmdline.h> #include "typesense_server_utils.h" #include "tsconfig.h" std::vector<char*> get_argv(std::vector<std::string> & args) { std::vector<char*> argv; for (const auto& arg : args) { argv.push_back((char*)arg.data()); }...
6,613
C++
.cpp
170
33.582353
91
0.648429
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,710
main.cpp
typesense_typesense/test/main.cpp
#include <gtest/gtest.h> #include "logger.h" class TypesenseTestEnvironment : public testing::Environment { public: virtual void SetUp() { } virtual void TearDown() { } }; int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); ::testing::AddGlobalTestEnvironment(new Types...
401
C++
.cpp
15
23.266667
70
0.711286
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,711
vector_query_ops_test.cpp
typesense_typesense/test/vector_query_ops_test.cpp
#include <gtest/gtest.h> #include "vector_query_ops.h" class VectorQueryOpsTest : public ::testing::Test { protected: void setupCollection() { } virtual void SetUp() { setupCollection(); } virtual void TearDown() { } }; TEST_F(VectorQueryOpsTest, ParseVectorQueryString) { vector...
3,472
C++
.cpp
65
48.476923
135
0.661162
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,712
array_utils_test.cpp
typesense_typesense/test/array_utils_test.cpp
#include <gtest/gtest.h> #include "array_utils.h" #include "logger.h" TEST(SortedArrayTest, AndScalar) { const size_t size1 = 9; uint32_t *arr1 = new uint32_t[size1]; for(size_t i = 0; i < size1; i++) { arr1[i] = i; } const size_t size2 = 10; uint32_t *arr2 = new uint32_t[size2]; s...
5,858
C++
.cpp
174
28.206897
124
0.586293
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,713
collection_faceting_test.cpp
typesense_typesense/test/collection_faceting_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionFacetingTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance()...
160,407
C++
.cpp
2,929
42.68351
146
0.51808
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,714
collection_test.cpp
typesense_typesense/test/collection_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <filesystem> #include <cstdlib> #include <collection_manager.h> #include <validator.h> #include "collection.h" #include "embedder_manager.h" #include "http_client.h" class CollectionTest : public ::testing::Te...
228,234
C++
.cpp
4,075
46.74773
224
0.568033
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,715
collection_infix_search_test.cpp
typesense_typesense/test/collection_infix_search_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionInfixSearchTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instanc...
30,831
C++
.cpp
542
43.774908
122
0.494795
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,716
id_list_test.cpp
typesense_typesense/test/id_list_test.cpp
#include <gtest/gtest.h> #include <id_list.h> #include "logger.h" TEST(IdListTest, IdListIteratorTest) { id_list_t id_list(2); for(size_t i = 0; i < 10; i++) { id_list.upsert(i*2); } auto iter = id_list.new_iterator(); for(size_t i = 0; i < 10; i++) { iter.skip_to(i*2); AS...
1,161
C++
.cpp
41
22.95122
69
0.561767
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,717
collection_sorting_test.cpp
typesense_typesense/test/collection_sorting_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionSortingTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance();...
121,195
C++
.cpp
2,541
38.77253
160
0.537733
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,718
analytics_manager_test.cpp
typesense_typesense/test/analytics_manager_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <collection_manager.h> #include <analytics_manager.h> #include "collection.h" #include "core_api.h" class AnalyticsManagerTest : public ::testing::Test { protected: Store *store; Store *analytic_store; CollectionManager& collectionManage...
73,766
C++
.cpp
1,947
29.486389
154
0.560757
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,719
stopwords_manager_test.cpp
typesense_typesense/test/stopwords_manager_test.cpp
#include <gtest/gtest.h> #include "collection.h" #include <vector> #include <collection_manager.h> #include <core_api.h> #include "stopwords_manager.h" class StopwordsManagerTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance(); S...
16,788
C++
.cpp
348
42.16954
123
0.647617
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,720
collection_locale_test.cpp
typesense_typesense/test/collection_locale_test.cpp
#include <gtest/gtest.h> #include <collection.h> #include <collection_manager.h> class CollectionLocaleTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance(); std::atomic<bool> quit = false; std::vector<std::string> query_fiel...
45,259
C++
.cpp
745
46.169128
171
0.562789
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,721
collection_override_test.cpp
typesense_typesense/test/collection_override_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionOverrideTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance()...
180,169
C++
.cpp
3,668
37.743457
128
0.521386
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,722
app_metrics_test.cpp
typesense_typesense/test/app_metrics_test.cpp
#include <gtest/gtest.h> #include "app_metrics.h" class AppMetricsTest : public ::testing::Test { protected: AppMetrics& metrics = AppMetrics::get_instance(); virtual void SetUp() { } virtual void TearDown() { } }; TEST_F(AppMetricsTest, StatefulRemoveDocs) { metrics.increment_count("GET ...
1,372
C++
.cpp
31
39.709677
76
0.69254
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,723
filter_test.cpp
typesense_typesense/test/filter_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <collection_manager.h> #include <filter.h> #include <posting.h> #include <chrono> #include "collection.h" class FilterTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = Collect...
100,521
C++
.cpp
1,799
44.603113
141
0.587973
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,724
personalization_model_manager_test.cpp
typesense_typesense/test/personalization_model_manager_test.cpp
#include <gtest/gtest.h> #include "personalization_model_manager.h" #include "store.h" #include <filesystem> #include "collection_manager.h" class PersonalizationModelManagerTest : public ::testing::Test { protected: std::string temp_dir; Store *store; CollectionManager& collectionManager = CollectionManag...
6,589
C++
.cpp
144
40.020833
118
0.674357
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,725
collection_specific_more_test.cpp
typesense_typesense/test/collection_specific_more_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionSpecificMoreTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instan...
135,792
C++
.cpp
2,703
40.012949
175
0.521852
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,726
collection_synonyms_test.cpp
typesense_typesense/test/collection_synonyms_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionSynonymsTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance()...
54,331
C++
.cpp
1,206
36.077944
148
0.539216
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,727
collection_all_fields_test.cpp
typesense_typesense/test/collection_all_fields_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <filesystem> #include <collection_manager.h> #include "collection.h" #include "embedder_manager.h" #include "http_client.h" class CollectionAllFieldsTest : public ::testing::Test { protected: Store *store;...
68,025
C++
.cpp
1,356
43.315634
139
0.60756
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,728
collection_schema_change_test.cpp
typesense_typesense/test/collection_schema_change_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionSchemaChangeTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instan...
66,447
C++
.cpp
1,572
34.476463
142
0.558508
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,729
sorted_array_test.cpp
typesense_typesense/test/sorted_array_test.cpp
#include <gtest/gtest.h> #include "sorted_array.h" #include <vector> #include <fstream> TEST(SortedArrayTest, Append) { sorted_array arr; const int SIZE = 10 * 1000; EXPECT_EQ(arr.getLength(), 0); EXPECT_EQ(arr.indexOf(100), 0); // when not found must be equal to length (0 in this case) for(uint...
21,306
C++
.cpp
374
42.772727
127
0.504224
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,730
collection_operations_test.cpp
typesense_typesense/test/collection_operations_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionOperationsTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance...
5,659
C++
.cpp
120
41.666667
103
0.577592
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,731
art_test.cpp
typesense_typesense/test/art_test.cpp
#include <fcntl.h> #include <inttypes.h> #include <stdio.h> #include <string.h> #include <cmath> #include <gtest/gtest.h> #include <art.h> #include <chrono> #include <posting.h> #define words_file_path (std::string(ROOT_DIR) + std::string("external/libart/tests/words.txt")).c_str() #define uuid_file_path (std::string(...
59,669
C++
.cpp
1,401
35.764454
178
0.591155
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,732
collection_filtering_test.cpp
typesense_typesense/test/collection_filtering_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class CollectionFilteringTest : public ::testing::Test { protected: std::string state_dir_path = "/tmp/typesense_test/collection_filtering"; Store *store;...
131,272
C++
.cpp
2,508
43.645534
171
0.56261
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,733
index_test.cpp
typesense_typesense/test/index_test.cpp
#include <gtest/gtest.h> #include "index.h" #include <vector> #include <s2/s2loop.h> /*TEST(IndexTest, PointInPolygon180thMeridian) { // somewhere in far eastern russia GeoCoord verts[3] = { {67.63378886620751, 179.87924212491276}, {67.6276069384328, -179.8364939577639}, {67.57499507281...
2,860
C++
.cpp
58
43.62069
105
0.692473
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,734
tokenizer_test.cpp
typesense_typesense/test/tokenizer_test.cpp
#include <gtest/gtest.h> #include "tokenizer.h" #include "logger.h" TEST(TokenizerTest, ShouldTokenizeNormalizeDifferentStrings) { const std::string withaccent = "Mise T.J. à jour Timy depuis PC"; std::vector<std::string> tokens; Tokenizer(withaccent, true, false).tokenize(tokens); std::vector<std::...
14,668
C++
.cpp
353
33.818697
104
0.631757
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,735
popular_queries_test.cpp
typesense_typesense/test/popular_queries_test.cpp
#include <gtest/gtest.h> #include "query_analytics.h" #include "logger.h" class PopularQueriesTest : public ::testing::Test { protected: virtual void SetUp() { } virtual void TearDown() { } }; TEST_F(PopularQueriesTest, PrefixQueryCompaction) { QueryAnalytics pq(10); auto now_ts_us = std::...
3,356
C++
.cpp
75
39.906667
106
0.643928
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,736
or_iterator_test.cpp
typesense_typesense/test/or_iterator_test.cpp
#include <gtest/gtest.h> #include <or_iterator.h> #include <posting_list.h> #include <posting.h> #include <filter_result_iterator.h> #include "logger.h" TEST(OrIteratorTest, IntersectTwoListsWith3SubLists) { std::vector<uint32_t> offsets = {0, 1, 3}; std::vector<std::vector<uint32_t>> plists = { {...
13,864
C++
.cpp
251
48.131474
1,951
0.626496
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,737
facet_index_test.cpp
typesense_typesense/test/facet_index_test.cpp
#include <gtest/gtest.h> #include "facet_index.h" TEST(FacetIndexTest, FacetValueDeletionString) { facet_index_t findex; findex.initialize("brand"); std::unordered_map<facet_value_id_t, std::vector<uint32_t>, facet_value_id_t::Hash> fvalue_to_seq_ids; std::unordered_map<uint32_t, std::vector<facet_val...
3,993
C++
.cpp
87
40.885057
106
0.655048
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,738
posting_list_test.cpp
typesense_typesense/test/posting_list_test.cpp
#include <gtest/gtest.h> #include "posting.h" #include "array_utils.h" #include <chrono> #include <vector> class PostingListTest : public ::testing::Test { protected: ThreadPool* pool; virtual void SetUp() { pool = new ThreadPool(4); } virtual void TearDown() { pool->shutdown(); ...
50,128
C++
.cpp
1,242
34.81723
125
0.597742
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,740
collection_join_test.cpp
typesense_typesense/test/collection_join_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" #include <join.h> class CollectionJoinTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::...
381,145
C++
.cpp
7,864
38.23881
170
0.541063
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,741
geo_filtering_old_test.cpp
typesense_typesense/test/geo_filtering_old_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <collection_manager.h> #include "collection.h" class GeoFilteringOldTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance(); ...
21,398
C++
.cpp
422
40
112
0.540465
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,742
conversation_test.cpp
typesense_typesense/test/conversation_test.cpp
#include <gtest/gtest.h> #include "conversation_manager.h" class ConversationTest : public ::testing::Test { protected: CollectionManager & collectionManager = CollectionManager::get_instance(); Store* store; std::atomic<bool> quit = false; nlohmann::json model = R"({ "...
9,260
C++
.cpp
202
37.925743
113
0.643579
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,743
ratelimit_test.cpp
typesense_typesense/test/ratelimit_test.cpp
#include <gtest/gtest.h> #include <string> #include <thread> #include "ratelimit_manager.h" #include "logger.h" #include "core_api.h" // Google test for RateLimitManager class RateLimitManagerTest : public ::testing::Test { protected: RateLimitManager *manager = RateLimitManager::getInstance(); Store *store; ...
41,406
C++
.cpp
713
52.112202
171
0.653205
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,744
numeric_range_trie_test.cpp
typesense_typesense/test/numeric_range_trie_test.cpp
#include <gtest/gtest.h> #include <collection_manager.h> #include "collection.h" #include "numeric_range_trie.h" class NumericRangeTrieTest : public ::testing::Test { protected: Store *store; CollectionManager & collectionManager = CollectionManager::get_instance(); std::atomic<bool> quit = false; std...
26,827
C++
.cpp
722
30.450139
165
0.579678
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,745
collection_manager_test.cpp
typesense_typesense/test/collection_manager_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <fstream> #include <collection_manager.h> #include <analytics_manager.h> #include "string_utils.h" #include "collection.h" class CollectionManagerTest : public ::testing::Test { protected: Store *store; Store* analytic_store; CollectionM...
73,614
C++
.cpp
1,597
37.405761
162
0.595926
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,746
collection_vector_search_test.cpp
typesense_typesense/test/collection_vector_search_test.cpp
#include <gtest/gtest.h> #include <string> #include <vector> #include <collection_manager.h> #include "collection.h" #include <cstdlib> #include <ctime> #include "conversation_manager.h" #include "conversation_model_manager.h" #include "index.h" #include "core_api.h" #include "vq_model_manager.h" #include "conversation...
370,078
C++
.cpp
4,228
74.035005
81,012
0.674929
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,747
system_metrics_test.cpp
typesense_typesense/test/system_metrics_test.cpp
#include <gtest/gtest.h> #include "system_metrics.h" TEST(SystemMetricsTest, ParsingNetworkStats) { std::string proc_net_dev_path = std::string(ROOT_DIR)+"test/resources/proc_net_dev.txt"; uint64_t received_bytes, sent_bytes; SystemMetrics::linux_get_network_data(proc_net_dev_path, received_bytes, sent_byt...
405
C++
.cpp
9
41.777778
92
0.747475
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,748
raft_server_test.cpp
typesense_typesense/test/raft_server_test.cpp
#include <gtest/gtest.h> #include <string> #include "raft_server.h" TEST(RaftServerTest, ResolveNodesConfigWithHostNames) { ASSERT_EQ("127.0.0.1:8107:8108,127.0.0.1:7107:7108,127.0.0.1:6107:6108", ReplicationState::resolve_node_hosts("127.0.0.1:8107:8108,127.0.0.1:7107:7108,127.0.0.1:6107:6108")); ...
960
C++
.cpp
15
54.333333
115
0.673036
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,749
string_utils_test.cpp
typesense_typesense/test/string_utils_test.cpp
#include <gtest/gtest.h> #include "string_utils.h" #include <iconv.h> #include <unicode/translit.h> #include <json.hpp> #include <join.h> TEST(StringUtilsTest, ShouldJoinString) { std::vector<std::string> parts = {"foo", "bar", "baz", "bazinga"}; const std::string & joined_str1 = StringUtils::join(parts, "/")...
18,516
C++
.cpp
394
41.967005
131
0.647441
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,750
personalization_model_test.cpp
typesense_typesense/test/personalization_model_test.cpp
#include <gtest/gtest.h> #include <string> #include <filesystem> #include "personalization_model.h" #include "collection_manager.h" class PersonalizationModelTest : public ::testing::Test { protected: std::string temp_dir; Store *store; CollectionManager& collectionManager = CollectionManager::get_instance...
8,034
C++
.cpp
186
36.715054
121
0.643783
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,751
query_analytics.cpp
typesense_typesense/src/query_analytics.cpp
#include "query_analytics.h" #include "logger.h" #include <algorithm> #include <mutex> #include "string_utils.h" QueryAnalytics::QueryAnalytics(size_t k, bool enable_auto_aggregation) : k(k), max_size(k * 2), auto_aggregation_enabled(enable_auto_aggregation) { } void QueryAnalytics::add(const std::st...
4,246
C++
.cpp
106
31.915094
120
0.6
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,752
array.cpp
typesense_typesense/src/array.cpp
#include "array.h" uint32_t array::at(uint32_t index) { return for_select(in, index); } bool array::contains(uint32_t value) { uint32_t index = for_linear_search(in, length, value); return index != length; } uint32_t array::indexOf(uint32_t value) { return for_linear_search(in, length, value); } boo...
3,366
C++
.cpp
91
31.307692
113
0.629424
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,753
sorted_array.cpp
typesense_typesense/src/sorted_array.cpp
#include "sorted_array.h" #include "array_utils.h" #include "logger.h" void sorted_array::load(const uint32_t *sorted_array, const uint32_t array_length) { min = array_length != 0 ? sorted_array[0] : 0; max = array_length > 1 ? sorted_array[array_length-1] : min; uint32_t size_required = (uint32_t) (sorte...
12,910
C++
.cpp
309
33.436893
125
0.588311
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,754
field.cpp
typesense_typesense/src/field.cpp
#include <store.h> #include "field.h" #include "magic_enum.hpp" #include "embedder_manager.h" #include <stack> #include <collection_manager.h> #include <regex> Option<bool> field::json_field_to_field(bool enable_nested_fields, nlohmann::json& field_json, std::vector<field>& the...
39,837
C++
.cpp
742
41.056604
162
0.54718
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,755
personalization_model_manager.cpp
typesense_typesense/src/personalization_model_manager.cpp
#include "personalization_model_manager.h" #include "sole.hpp" #include <glog/logging.h> Option<nlohmann::json> PersonalizationModelManager::get_model(const std::string& model_id) { std::shared_lock lock(models_mutex); auto it = models.find(model_id); if (it == models.end()) { return Option<nlohman...
5,202
C++
.cpp
119
37.554622
166
0.645672
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,756
ids_t.cpp
typesense_typesense/src/ids_t.cpp
#include "ids_t.h" #include "id_list.h" int64_t compact_id_list_t::upsert(const uint32_t id) { // format: id1, id2, id3 uint32_t last_id = (length == 0) ? 0 : ids[length - 1]; int64_t extra_length_needed = 0; if(length == 0 || id > last_id) { extra_length_needed = 1; if(length + extra_...
13,726
C++
.cpp
359
28.905292
112
0.545626
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,757
batched_indexer.cpp
typesense_typesense/src/batched_indexer.cpp
#include "batched_indexer.h" #include "core_api.h" #include "thread_local_vars.h" #include "cached_resource_stat.h" #include "collection_manager.h" BatchedIndexer::BatchedIndexer(HttpServer* server, Store* store, Store* meta_store, const size_t num_threads, const Config& config, const st...
27,533
C++
.cpp
517
38.437137
131
0.532798
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,758
cached_resource_stat.cpp
typesense_typesense/src/cached_resource_stat.cpp
#include "cached_resource_stat.h" #include <fstream> #include "logger.h" cached_resource_stat_t::resource_check_t cached_resource_stat_t::has_enough_resources(const std::string& data_dir_path, const int disk_used_max_percentage, ...
4,157
C++
.cpp
92
35.402174
124
0.583519
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,759
stemmer_manager.cpp
typesense_typesense/src/stemmer_manager.cpp
#include "stemmer_manager.h" Stemmer::Stemmer(const char * language) { this->stemmer = sb_stemmer_new(language, nullptr); this->cache = LRU::Cache<std::string, std::string>(20); } Stemmer::~Stemmer() { sb_stemmer_delete(stemmer); } std::string Stemmer::stem(const std::string & word) { std::unique_lo...
1,825
C++
.cpp
50
32.38
109
0.684776
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,760
conversation_manager.cpp
typesense_typesense/src/conversation_manager.cpp
#include "conversation_manager.h" #include "logger.h" #include <chrono> #include "http_client.h" #include "core_api.h" Option<std::string> ConversationManager::add_conversation(const nlohmann::json& conversation, const nlohmann::json& model, const std::string& id) { std::unique_lock lock(conversations_mutex); ...
15,327
C++
.cpp
333
38.498498
247
0.624345
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,761
override.cpp
typesense_typesense/src/override.cpp
#include <string_utils.h> #include "override.h" #include "tokenizer.h" Option<bool> override_t::parse(const nlohmann::json& override_json, const std::string& id, override_t& override, const std::string& locale, const std::vect...
10,679
C++
.cpp
241
35.170124
117
0.568966
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,762
core_api.cpp
typesense_typesense/src/core_api.cpp
#include <chrono> #include <thread> #include <app_metrics.h> #include <regex> #include <analytics_manager.h> #include <housekeeper.h> #include "typesense_server_utils.h" #include "core_api.h" #include "string_utils.h" #include "collection.h" #include "collection_manager.h" #include "system_metrics.h" #include "logger.h...
112,214
C++
.cpp
2,554
35.749804
190
0.603235
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,763
collection_manager.cpp
typesense_typesense/src/collection_manager.cpp
#include <string> #include <vector> #include <json.hpp> #include <app_metrics.h> #include <analytics_manager.h> #include <event_manager.h> #include "collection_manager.h" #include "batched_indexer.h" #include "logger.h" #include "magic_enum.hpp" #include "stopwords_manager.h" #include "conversation_model.h" #include "f...
95,697
C++
.cpp
1,858
39.198062
158
0.57404
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,764
index.cpp
typesense_typesense/src/index.cpp
#include "index.h" #include <memory> #include <numeric> #include <chrono> #include <set> #include <unordered_map> #include <random> #include <art.h> #include <array_utils.h> #include <match_score.h> #include <string_utils.h> #include <tokenizer.h> #include <s2/s2point.h> #include <s2/s2latlng.h> #include <s2/s2region_...
375,475
C++
.cpp
6,725
38.917621
233
0.520383
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,765
array_utils.cpp
typesense_typesense/src/array_utils.cpp
#include "array_utils.h" #include <memory.h> size_t ArrayUtils::and_scalar(const uint32_t *A, const size_t lenA, const uint32_t *B, const size_t lenB, uint32_t **results) { if (lenA == 0 || lenB == 0) { return 0; } *results = new uint32_t[std::min(lenA, lenB)]; uint32_t *out ...
4,179
C++
.cpp
149
21.604027
111
0.527382
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,766
http_data.cpp
typesense_typesense/src/http_data.cpp
#include "http_data.h" std::string route_path::_get_action() { // `resource:operation` forms an action // operations: create, get, list, delete, search, import, export std::string resource_path; std::string operation; size_t identifier_index = 0; for(size_t i = 0; i < path_parts.size(); i++) ...
1,996
C++
.cpp
49
33.653061
105
0.588023
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,767
cvt.cpp
typesense_typesense/src/cvt.cpp
#include <cvt.h> #include <cstring> #include "logger.h" bool CVTrie::add(const char *key, const uint8_t length, void *value) { // If the key exists, augment the node, otherwise insert a new node if(root == nullptr) { // Trie is empty, so add a single leaf node: // [0|PTRLEAF][3][f][o][o] ...
1,890
C++
.cpp
55
25.890909
81
0.536894
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,768
synonym_index.cpp
typesense_typesense/src/synonym_index.cpp
#include "synonym_index.h" #include "posting.h" void SynonymIndex::synonym_reduction_internal(const std::vector<std::string>& tokens, const std::string& locale, size_t start_window_size, size_t start_index_pos, ...
14,451
C++
.cpp
294
36.136054
132
0.545939
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,769
auth_manager.cpp
typesense_typesense/src/auth_manager.cpp
#include "auth_manager.h" #include <openssl/evp.h> #include <regex> #include <join.h> constexpr const char* AuthManager::DOCUMENTS_SEARCH_ACTION; constexpr const uint64_t api_key_t::FAR_FUTURE_TIMESTAMP; Option<bool> AuthManager::init(Store* store, const std::string& bootstrap_auth_key) { // This function must be...
16,517
C++
.cpp
364
36.675824
124
0.587393
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,770
ratelimit_manager.cpp
typesense_typesense/src/ratelimit_manager.cpp
#include "ratelimit_manager.h" #include "string_utils.h" #include "logger.h" #include <iterator> RateLimitManager * RateLimitManager::getInstance() { if(!instance) { instance = new RateLimitManager(); } return instance; } void RateLimitManager::temp_ban_entity(const rate_limit_entity_t& entity, co...
30,524
C++
.cpp
659
39.373293
309
0.634275
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,771
or_iterator.cpp
typesense_typesense/src/or_iterator.cpp
#include "or_iterator.h" #include "filter.h" bool or_iterator_t::at_end(const std::vector<or_iterator_t>& its) { // if any iterator is invalid, we stop for(const auto& it : its) { if(!it.valid()) { return true; } } return false; } bool or_iterator_t::at_end2(const std::vec...
11,829
C++
.cpp
335
24.376119
116
0.494227
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
3,772
text_embedder_remote.cpp
typesense_typesense/src/text_embedder_remote.cpp
#include <http_proxy.h> #include "text_embedder_remote.h" #include "embedder_manager.h" Option<bool> RemoteEmbedder::validate_string_properties(const nlohmann::json& model_config, const std::vector<std::string>& properties) { for(auto& property : properties) { if(model_config.count(property) == 0 || !mode...
30,291
C++
.cpp
588
43.644558
239
0.622346
typesense/typesense
20,571
633
548
GPL-3.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false