Repository Analysis

typesense/typesense

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

1.4 Likely human-written View on GitHub
1.4
Adjusted Score
1.4
Raw Score
100%
Time Factor
2026-05-25
Last Push
25,912
Stars
C++
Language
285,318
Lines of Code
364
Files
569
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 1LOW 568

Pattern Findings

569 matches across 5 categories. Click a row to expand file-level details.

Over-Commented Block530 hits · 360 pts
SeverityFileLineSnippet
LOWdocker/patches/brpc_cmakelists.txt1# Licensed to the Apache Software Foundation (ASF) under one
LOWtest/art_test.cpp1#include <fcntl.h>
LOWtest/core_api_utils_test.cpp1#include "collection.h"
LOWtest/collection_vector_search_test.cpp1#include <gtest/gtest.h>
LOWtest/union_test.cpp1#include <gtest/gtest.h>
LOWtest/collection_manager_test.cpp1#include <gtest/gtest.h>
LOWtest/api_acl_test.cpp1#include <gtest/gtest.h>
LOWtest/collection_test.cpp1#include <gtest/gtest.h>
LOWtest/collection_test.cpp4861// nlohmann::json schema = R"({
LOWinclude/index.h1#pragma once
LOWinclude/index.h21#include "match_score.h"
LOWinclude/app_metrics.h1#pragma once
LOWinclude/string_utils.h1#pragma once
LOWinclude/json.hpp21#include <algorithm> // all_of, find, for_each
LOWinclude/json.hpp41// SPDX-License-Identifier: MIT
LOWinclude/json.hpp61 #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PA
LOWinclude/json.hpp81 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
LOWinclude/json.hpp141#endif
LOWinclude/json.hpp161#include <array> // array
LOWinclude/json.hpp181
LOWinclude/json.hpp201
LOWinclude/json.hpp221// __ _____ _____ _____
LOWinclude/json.hpp321// __ _____ _____ _____
LOWinclude/json.hpp341 #undef JSON_HEDLEY_STRINGIFY_EX
LOWinclude/json.hpp361 #undef JSON_HEDLEY_CONCAT3_EX
LOWinclude/json.hpp381 #undef JSON_HEDLEY_VERSION_DECODE_MINOR
LOWinclude/json.hpp401#endif
LOWinclude/json.hpp421#endif
LOWinclude/json.hpp441#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK)
LOWinclude/json.hpp461 #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_E
LOWinclude/json.hpp481
LOWinclude/json.hpp501 #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)
LOWinclude/json.hpp521 #undef JSON_HEDLEY_ARM_VERSION
LOWinclude/json.hpp541#if defined(__ibmxl__)
LOWinclude/json.hpp561#if \
LOWinclude/json.hpp581
LOWinclude/json.hpp601#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__)
LOWinclude/json.hpp621#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK)
LOWinclude/json.hpp641 #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENC
LOWinclude/json.hpp661
LOWinclude/json.hpp681#if defined(_CRAYC)
LOWinclude/json.hpp701#if defined(__IAR_SYSTEMS_ICC__)
LOWinclude/json.hpp721#if defined(__TINYC__)
LOWinclude/json.hpp741#if defined(JSON_HEDLEY_DMC_VERSION_CHECK)
LOWinclude/json.hpp761 #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_E
LOWinclude/json.hpp781
LOWinclude/json.hpp821 #undef JSON_HEDLEY_GCC_VERSION_CHECK
LOWinclude/json.hpp841
LOWinclude/json.hpp861 #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE
LOWinclude/json.hpp881 (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0))
LOWinclude/json.hpp901#else
LOWinclude/json.hpp921#endif
LOWinclude/json.hpp941#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE)
LOWinclude/json.hpp961#endif
LOWinclude/json.hpp981 #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)
LOWinclude/json.hpp1001 #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,mi
LOWinclude/json.hpp1021
LOWinclude/json.hpp1061 #define JSON_HEDLEY_PRAGMA(value) __pragma(value)
LOWinclude/json.hpp1081#elif \
LOWinclude/json.hpp1101#else
470 more matches not shown…
Hyper-Verbose Identifiers23 hits · 25 pts
SeverityFileLineSnippet
LOWbenchmark/src/global.ts132function restartTypesenseServerFresh(): ResultAsync<NodeConfig[], ErrorWithMessage> {
LOWbenchmark/src/benchmarks/search.ts222function transformParamsToQueryString(params: SearchParams): string {
LOWbenchmark/src/benchmarks/search.ts329function instantSearchQueriesForSearchPhrase(searchPhrase: string): string[] {
LOWtests/src/global-typesense-manager.ts96function restartTypesenseServerFresh(): ResultAsync<NodeConfig[], ErrorWithMessage> {
LOW…/tests/reference_cluster_follower_node_restart.test.ts95function getTailFitmentCountPerMarket(): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts99function getExpectedProductCountPerMarket(): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts103function getExpectedVehicleCountPerMarket(): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts107function getExpectedFitmentCountPerMarket(market: MarketConfig): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts316async function pollClusterHealthAndStats(nodes: MultiNodeConfig[], label: string): Promise<NodeDiagnosticsSnapshot[]> {
LOW…/tests/reference_cluster_follower_node_restart.test.ts424async function waitForPositiveQueuedWrites(node: MultiNodeConfig, timeoutMs: number): Promise<StatusResponse> {
LOW…/tests/reference_cluster_follower_node_restart.test.ts446function seedLocalSnapshotFromLeader(leaderNode: MultiNodeConfig, followerNode: MultiNodeConfig) {
LOW…/tests/reference_cluster_follower_node_restart.test.ts462function getMaxLoggedInFlightRequestCount(node: MultiNodeConfig, verb: "Serialized" | "Restored"): number | null {
LOW…/tests/reference_cluster_follower_node_restart.test.ts477async function waitForPositiveInFlightSnapshotLog(node: MultiNodeConfig, verb: "Serialized" | "Restored", timeoutMs: num
LOW…/tests/reference_cluster_follower_node_restart.test.ts593function getVehicleIndexForNonTargetFitment(market: MarketConfig, productIndex: number, fitmentIndex: number): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts726function getExistingNonTargetProductIndex(market: MarketConfig, ordinal: number): number {
LOW…/tests/reference_cluster_follower_node_restart.test.ts741function startTailReferenceImports(port: number): Promise<void>[] {
LOW…/tests/reference_cluster_follower_node_restart.test.ts783async function executeReferenceJoinSearch(market: MarketConfig, node: MultiNodeConfig): Promise<SearchExecution> {
LOW…/tests/reference_cluster_follower_node_restart.test.ts865async function assertAllJoinQueriesSucceed(nodes: MultiNodeConfig[]) {
LOW…/tests/reference_cluster_follower_node_restart.test.ts876async function waitForRestoredCollectionsToLoad(node: MultiNodeConfig, timeoutMs: number) {
LOW…/tests/reference_cluster_follower_node_restart.test.ts912async function assertRestoredReferenceSchemas(node: MultiNodeConfig) {
LOWapi_tests/tests/nested_curly_filter.test.ts204async function highLoadSearchWithTimeout(filterBy: string, timeoutMs: number) {
LOWapi_tests/src/request.ts62export async function waitForSingleAnalyticsFlush() {
LOWapi_tests/src/request.ts81export async function waitForMultiAnalyticsFlush() {
Verbosity Indicators7 hits · 15 pts
SeverityFileLineSnippet
LOWinclude/parasort.h99// Step 1: Pick np*sf random elements from the input array.
LOWinclude/parasort.h104// Step 2: Count how many elements go into each bucket.
LOWinclude/parasort.h113// Step 3: Create a mapping scheme to separate partitions.
LOWinclude/parasort.h118// Step 4: Map the input array into np separate partitions.
LOWinclude/parasort.h126// Step 5: Sort each partition in a separate thread.
LOWinclude/parasort.h133// Step 6: Copy the temporary container for the sorted array into the input array.
LOWsrc/collection.cpp5228 // we need to check if `array_i`exists within match_indices vec.
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippet
LOWtest/collection_faceting_test.cpp4053 "name": "Acme Corp"
LOWtest/collection_faceting_test.cpp4109 ASSERT_EQ("Acme Corp", result["facet_counts"][0]["counts"][0]["value"].get<std::string>());
LOWtest/collection_vector_search_test.cpp4054 const std::string long_text = "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
LOWtest/collection_vector_search_test.cpp4054 const std::string long_text = "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
LOWtest/collection_nested_fields_test.cpp332 "company_name": "Acme Corp",
LOWtest/collection_nested_fields_test.cpp2736 "company_name": "Acme Corp",
LOWtest/collection_test.cpp3542 {"Acme Corp", "Mexico", "Canadoo", "300"}
LOWapi_tests/tests/documents.test.ts92 company_name: "Acme Corp",
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/tests.yml26 # Define the compiler