### ICU4J Data Installation Output Example Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Example output from the ICU4J data installation process, showing directory creation and file copying. ```bash make[1]: Entering directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' mkdir -p ./out/icu4j/com/ibm/icu/impl/data/icudt73b mkdir -p ./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt73b LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg ./out/tmp/icudt73l.dat ./out/icu4j/icudt73b.dat -s ./out/build/icudt73l -x '*' -tb -d ./out/icu4j/com/ibm/icu/impl/data/icudt73b mv ./out/icu4j/"com/ibm/icu/impl/data/icudt73b/zoneinfo64.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt73b/metaZones.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt73b/timezoneTypes.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt73b/windowsZones.res" "./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt73b" jar cf ./out/icu4j/icudata.jar -C ./out/icu4j com/ibm/icu/impl/data/icudt73b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icudata.jar /tmp/icu4j/main/shared/data jar cf ./out/icu4j/icutzdata.jar -C ./out/icu4j/tzdata com/ibm/icu/impl/data/icudt73b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icutzdata.jar /tmp/icu4j/main/shared/data make[1]: Leaving directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' ``` -------------------------------- ### ICU4J Data Installation Output Example Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Example output from the ICU4J data installation process, showing the creation of Unicode .icu files and JAR archives. ```bash Unicode .icu files built to ./out/build/icudt60l echo timestamp > uni-core-data mkdir -p ./out/icu4j/com/ibm/icu/impl/data/icudt60b mkdir -p ./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt60b echo pnames.icu uprops.icu ucase.icu ubidi.icu nfc.nrm > ./out/icu4j/add.txt LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg ./out/tmp/icudt60l.dat ./out/icu4j/icudt60b.dat -a ./out/icu4j/add.txt -s ./out/build/icudt60l -x '*' -tb -d ./out/icu4j/com/ibm/icu/impl/data/icudt60b mv ./out/icu4j/"com/ibm/icu/impl/data/icudt60b/zoneinfo64.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt60b/metaZones.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt60b/timezoneTypes.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt60b/windowsZones.res" "./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt60b" jar cf ./out/icu4j/icudata.jar -C ./out/icu4j com/ibm/icu/impl/data/icudt60b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icudata.jar /tmp/icu4j/main/shared/data jar cf ./out/icu4j/icutzdata.jar -C ./out/icu4j/tzdata com/ibm/icu/impl/data/icudt60b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icutzdata.jar /tmp/icu4j/main/shared/data make[1]: Leaving directory `/usr/local/google/home/mscherer/svn.icu/uni10/dbg/icu4c/data' ``` -------------------------------- ### ICU4C Data Installation Output Example Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Example output from the ICU4C data installation process, showing directory creation and file copying for ICU4J data. ```bash make[1]: Entering directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' mkdir -p ./out/icu4j/com/ibm/icu/impl/data/icudt66b mkdir -p ./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt66b LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg ./out/tmp/icudt66l.dat ./out/icu4j/icudt66b.dat -s ./out/build/icudt66l -x '*' -tb -d ./out/icu4j/com/ibm/icu/impl/data/icudt66b mv ./out/icu4j/"com/ibm/icu/impl/data/icudt66b/zoneinfo64.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt66b/metaZones.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt66b/timezoneTypes.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt66b/windowsZones.res" "./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt66b" jar cf ./out/icu4j/icudata.jar -C ./out/icu4j com/ibm/icu/impl/data/icudt66b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icudata.jar /tmp/icu4j/main/shared/data jar cf ./out/icu4j/icutzdata.jar -C ./out/icu4j/tzdata com/ibm/icu/impl/data/icudt66b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icutzdata.jar /tmp/icu4j/main/shared/data make[1]: Leaving directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' ``` -------------------------------- ### ICU4J Data Installation Output Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Example output from the ICU4J data installation process, showing the creation of .icu files, JARs, and the packaging of data. ```bash ... Unicode .icu files built to ./out/build/icudt56l echo timestamp > uni-core-data mkdir -p ./out/icu4j/com/ibm/icu/impl/data/icudt56b mkdir -p ./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt56b echo pnames.icu uprops.icu ucase.icu ubidi.icu nfc.nrm > ./out/icu4j/add.txt LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg ./out/tmp/icudt56l.dat ./out/icu4j/icudt56b.dat -a ./out/icu4j/add.txt -s ./out/build/icudt56l -x '*' -tb -d ./out/icu4j/com/ibm/icu/impl/data/icudt56b mv ./out/icu4j/"com/ibm/icu/impl/data/icudt56b/zoneinfo64.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt56b/metaZones.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt56b/timezoneTypes.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt56b/windowsZones.res" "./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt56b" jar cf ./out/icu4j/icudata.jar -C ./out/icu4j com/ibm/icu/impl/data/icudt56b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icudata.jar /tmp/icu4j/main/shared/data jar cf ./out/icu4j/icutzdata.jar -C ./out/icu4j/tzdata com/ibm/icu/impl/data/icudt56b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icutzdata.jar /tmp/icu4j/main/shared/data make[1]: Leaving directory `/home/mscherer/svn.icu/trunk/dbg/data' ``` -------------------------------- ### Build ICU and Install Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Builds the ICU library and installs it, ensuring that the tools can access the new definitions from the installed header files. The output of the make install command is redirected to 'out.txt', and the last 30 lines are displayed. ```bash $ICU_ROOT/dbg/icu4c$ echo;echo; make -j7 install &> out.txt ; tail -n 30 out.txt ; date ``` -------------------------------- ### ICU4C Data Installation Output Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Example output from the ICU4C data installation process, showing directory creation and file packaging. ```bash make[1]: Entering directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' mkdir -p ./out/icu4j/com/ibm/icu/impl/data/icudt70b mkdir -p ./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt70b LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg ./out/tmp/icudt70l.dat ./out/icu4j/icudt70b.dat -s ./out/build/icudt70l -x '*' -tb -d ./out/icu4j/com/ibm/icu/impl/data/icudt70b mv ./out/icu4j/"com/ibm/icu/impl/data/icudt70b/zoneinfo64.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt70b/metaZones.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt70b/timezoneTypes.res" ./out/icu4j/"com/ibm/icu/impl/data/icudt70b/windowsZones.res" "./out/icu4j/tzdata/com/ibm/icu/impl/data/icudt70b" jar cf ./out/icu4j/icudata.jar -C ./out/icu4j com/ibm/icu/impl/data/icudt70b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icudata.jar /tmp/icu4j/main/shared/data jar cf ./out/icu4j/icutzdata.jar -C ./out/icu4j/tzdata com/ibm/icu/impl/data/icudt70b/ mkdir -p /tmp/icu4j/main/shared/data cp ./out/icu4j/icutzdata.jar /tmp/icu4j/main/shared/data make[1]: Leaving directory '/usr/local/google/home/mscherer/icu/uni/dbg/icu4c/data' ``` -------------------------------- ### Setup for ICU zh collation data generation Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Sets up environment variables and installs necessary JARs for generating ICU zh collation data. JAVA_HOME must be explicitly set. ```shell export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export TOOLS_ROOT=$ICU_SRC/tools export CLDR_DIR=$CLDR_SRC export CLDR_DATA_DIR=$CLDR_DIR cd "$TOOLS_ROOT/cldr/lib" ./install-cldr-jars.sh "$CLDR_DIR" ``` -------------------------------- ### Install Basic Tools on Ubuntu/Debian Source: https://github.com/valkey-io/valkey-search/blob/main/README.md Installs essential development tools including compilers, build systems, and debugging utilities required for building Valkey-Search. ```sh sudo apt update sudo apt install -y clangd \ build-essential \ g++ \ cmake \ libgtest-dev \ ninja-build \ libssl-dev \ clang-tidy \ clang-format \ libsystemd-dev ``` -------------------------------- ### Example FT._LIST Output Source: https://github.com/valkey-io/valkey-search/blob/main/docs/commands/ft._list.md This example shows the typical output format when executing the FT._LIST command, displaying the names of existing indexes. ```text ft._list 1) index 2) products 3) users 4) transactions ``` -------------------------------- ### Build ICU and Install Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Builds and installs the ICU library. This step is necessary to ensure that the tools can access the latest definitions from installed header files. ```bash make -j5 install > out.txt 2>&1 ; tail -n 20 out.txt ``` -------------------------------- ### Build ICU with Make Install Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Build and install ICU using make, redirecting output to a file and displaying the last 30 lines. ```bash make -j5 install > out.txt 2>&1 ; tail -n 30 out.txt ``` -------------------------------- ### Install Dependencies for Integration Tests on Ubuntu/Debian Source: https://github.com/valkey-io/valkey-search/blob/main/README.md Installs all required system packages and Redis repository for running integration tests, including memtier-benchmark. ```sh sudo apt update sudo apt install -y lsb-release \ curl \ coreutils \ libsystemd-dev \ python3-pip \ python3.12-venv \ locales-all \ locales \ gpg curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list sudo apt update sudo apt-get install -y memtier-benchmark ``` -------------------------------- ### Index Creation and Data Setup Source: https://github.com/valkey-io/valkey-search/blob/main/docs/topics/search-query.md Commands to create a Valkey Search index with a TAG field and populate it with sample data for demonstration purposes. ```bash valkey-cli FT.CREATE index SCHEMA color TAG valkey-cli HSET key1 color blue valkey-cli HSET key2 color black valkey-cli HSET key3 color green valkey-cli HSET key4 color beige valkey-cli HSET key5 color "beige,green" valkey-cli HSET key6 color "hello world, green is my heart" ``` -------------------------------- ### View Build Script Help Source: https://github.com/valkey-io/valkey-search/blob/main/README.md Displays the available command-line arguments and options for the Valkey-Search build script. ```sh ./build.sh --help ``` -------------------------------- ### Setup for Generating ICU zh Collation Data Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Sets up environment variables and installs necessary JARs for the Unicode Tools CLDR to ICU data generation process. Ensure JAVA_HOME and other paths are correctly configured. ```bash export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export TOOLS_ROOT=~/icu/uni/src/tools export CLDR_DIR=~/cldr/uni/src export CLDR_DATA_DIR=~/cldr/uni/src cd "$TOOLS_ROOT/cldr/lib" ./install-cldr-jars.sh "$CLDR_DIR" ``` -------------------------------- ### Logical AND Example Source: https://github.com/valkey-io/valkey-search/blob/main/COMMANDS.md Combine multiple search predicates using a space to ensure all conditions are met. ```redis-cli query1 query2 query3 ``` -------------------------------- ### FT.CREATE Command Syntax Source: https://github.com/valkey-io/valkey-search/blob/main/docs/commands/ft.create.md The basic syntax for the FT.CREATE command, outlining all available options and parameters for index creation. ```text FT.CREATE [ON HASH | ON JSON] [PREFIX [...]] [SCORE default_value] [SCORE_FIELD ] [LANGUAGE ] [SKIPINITIALSCAN] [MINSTEMSIZE ] [WITHOFFSETS | NOOFFSETS] [NOSTOPWORDS | STOPWORDS word ...] [PUNCTUATION ] SCHEMA ( [AS ] NUMERIC | TAG [SEPARATOR ] [CASESENSITIVE] | TEXT [NOSTEM] [WITHSUFFIXTRIE | NOSUFFIXTRIE] [WEIGHT ] | VECTOR [HNSW | FLAT] [ ]+ [SORTABLE] )+ ``` -------------------------------- ### Execute Dev Container Setup Script Source: https://github.com/valkey-io/valkey-search/blob/main/README.md Run the setup script for the development container environment. This script is located in the .devcontainer directory at the root of the cloned repository. ```sh .devcontainer/setup.sh ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/valkey-io/valkey-search/blob/main/testing/integration/CMakeLists.txt Installs project dependencies listed in `requirements.txt` into the virtual environment using pip. Ensures the `requirements.txt` file exists before attempting installation. ```cmake # Step 2: Install dependencies from requirements.txt if(NOT EXISTS "${CMAKE_SOURCE_DIR}/requirements.txt") message(FATAL_ERROR "requirements.txt not found! Python dependencies may be missing.") endif() ``` ```cmake message(STATUS "Installing dependencies in virtual environment...") execute_process( COMMAND ${PYTHON_VENV_EXECUTABLE} -m pip install -r ${CMAKE_SOURCE_DIR}/requirements.txt RESULT_VARIABLE PIP_RESULT ) ``` ```cmake if(NOT PIP_RESULT EQUAL 0) message(FATAL_ERROR "Failed to install dependencies from requirements.txt") endif() ``` -------------------------------- ### Install ICU4J Data Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Installs ICU4J data, building Unicode .icu files and packaging them into JAR files. This command specifies the ICU4J root directory and installs data into a temporary location. ```bash make ICU4J_ROOT=/tmp/icu4j icu4j-data-install ``` -------------------------------- ### Example RDB Save Implementation Source: https://github.com/valkey-io/valkey-search/blob/main/rfc/rdb-format.md Demonstrates how to use `SupplementalRDBWriter` to save index schema, content, and key-to-ID mappings to the RDB. The writer is automatically destructed, flushing data. ```cpp void IndexSchema::RDBSave() { data_model::RDBSection section; section.set_type(RdbSectionType::RDB_SECTION_INDEX_SCHEMA); section.set_index_schema_definition(this->ToProto()); section.set_supplemental_count(this->GetAttributeCount() * 2); ValkeyModule_RDBSaveString(section.SerializeAsString()); for (auto &attribute : attributes_) { data_model::SupplementalContent index_content; index_content.set_type(SUPPLEMENTAL_CONTENT_INDEX_CONTENT); data_model::IndexContentHeader index_content_header; index_content_header.set_attribute(attribute.second.ToProto()); index_content.set_index_content_header(index_content_header); ValkeyModule_RDBSaveString(index_content.SerializeAsString()); auto index_writer = std::make_unique(); attribute.second.GetIndex()->SaveIndex(std::move(index_writer)); /* SaveIndex writes all index contents as binary, then the writer is destructed once done */ data_model::SupplementalContent key_mapping; key_mapping.set_type(SUPPLEMENTAL_CONTENT_KEY_TO_ID_MAP); data_model::KeyToIdHeader key_to_id_header; key_to_id_header.set_attribute(attribute.second.ToProto()); key_mapping.set_key_to_id_header(key_to_id_header); ValkeyModule_RDBSaveString(key_mapping.SerializeAsString()); auto key_to_id_writer = std::make_unique(); attribute.second.GetIndex()->SaveMapping(std::move(index_writer)); /* SaveMapping writes all key to id mappings as binary, then the writer is destructed once done */ } } ``` -------------------------------- ### Set ICU Installation and Source Directories Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Configure CMake with the installation and source locations for ICU. ```cmake set(ICU_INST_DIR /home/mscherer/svn.icu/trunk/inst) set(ICU_SRC_DIR /home/mscherer/svn.icu/trunk/src) ``` -------------------------------- ### Example: HASH Vector Field Creation and HSET Source: https://github.com/valkey-io/valkey-search/blob/main/docs/topics/search-data-formats.md Demonstrates creating a HASH index with a vector field and setting a vector value using HSET. ```redis-cli FT.CREATE idx ON HASH SCHEMA vec VECTOR FLAT 6 TYPE FLOAT32 DIM 3 DISTANCE_METRIC L2 HSET doc:1 vec "\x00\x00\x80?\x00\x00\x00\x00\x00\x00\x00\x00" ``` -------------------------------- ### Set ICU Installation Directory Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Sets the installation directory for ICU. This is typically a path on the local system. ```cmake set(ICU_INST_DIR /usr/local/google/home/mscherer/icu/mine/inst/icu4c) ``` -------------------------------- ### Building ICU with Make Install Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Compiles and installs ICU using make, redirecting output to 'out.txt' and displaying the last 30 lines. This step is necessary for the Unicode tools build to pick up new definitions from installed header files. ```bash $ICU_ROOT/dbg/icu4c$ echo;echo; make -j7 install > out.txt 2>&1 ; tail -n 30 out.txt ; date ``` -------------------------------- ### Connect to Valkey CLI Source: https://github.com/valkey-io/valkey-search/blob/main/QUICK_START.md Connect to the running Valkey server using the command-line interface. ```bash valkey-cli ``` -------------------------------- ### Install ICU4J Data Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Installs ICU4J data, potentially requiring reconfiguration if specific .icu files are missing. ```bash mkdir -p /tmp/icu4j/com/ibm/icu/impl/data/$ICUDT $ICU_ROOT/dbg/icu4c$ make ICU4J_ROOT=/tmp/icu4j icu4j-data-install ``` -------------------------------- ### Set Modules Install Prefix Source: https://github.com/valkey-io/valkey-search/blob/main/submodules/CMakeLists.txt Sets the installation prefix for modules, which is a subdirectory within the main modules directory. ```cmake set(MODULES_INSTALL_PREFIX "${MODULES_DIR}/install") ``` -------------------------------- ### Example: JSON Vector Field Creation and JSON.SET Source: https://github.com/valkey-io/valkey-search/blob/main/docs/topics/search-data-formats.md Demonstrates creating a JSON index with a vector field and setting a vector value using JSON.SET. ```redis-cli FT.CREATE idx ON JSON SCHEMA $.vec AS vec VECTOR FLAT 6 TYPE FLOAT32 DIM 3 DISTANCE_METRIC L2 JSON.SET doc:1 $ '{"vec": "[1.0, 0.0, 0.0]"}' ``` -------------------------------- ### Check and Install Pip Source: https://github.com/valkey-io/valkey-search/blob/main/testing/integration/CMakeLists.txt Verifies if pip is installed and available. If pip is not found, the build process will halt with an error. ```cmake # Check if pip is installed execute_process( COMMAND ${Python_EXECUTABLE} -m pip --version RESULT_VARIABLE PIP_CHECK ) ``` ```cmake # Install pip if missing if(NOT PIP_CHECK EQUAL 0) message(FATAL_ERROR "pip not found.") endif() ``` -------------------------------- ### Standard Test Execution Source: https://github.com/valkey-io/valkey-search/blob/main/integration/README.md Builds the Valkey-Search module and executes the integration test suite. Ensure you have the necessary build tools and Git installed. ```bash # Set up workspace mkdir -p $HOME/src && cd $_ git clone https://github.com/valkey-io/valkey-search.git cd valkey-search # Build and test ./build.sh integration/run.sh ``` -------------------------------- ### Set ICU Installation and Source Directories (CMake) Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Configure CMake variables to specify the installation and source directories for ICU. ```cmake set(ICU_INST_DIR /usr/local/google/home/mscherer/icu/mine/inst/icu4c) set(ICU4C_SRC_DIR /usr/local/google/home/mscherer/icu/mine/src/icu4c) ``` -------------------------------- ### Create a Valkey Search Index Source: https://github.com/valkey-io/valkey-search/blob/main/COMMANDS.md Use FT.CREATE to define and build a new search index. Specify the index name, data source (HASH or JSON), optional prefixes, and the schema with field types, aliases, and options like SORTABLE. ```bash FT.CREATE ON HASH [PREFIX [...]] [SKIPINITIALSCAN] SCHEMA ( [AS ] NUMERIC | TAG [SEPARATOR ] [CASESENSITIVE] | VECTOR [HNSW | FLAT] [ ]+ [SORTABLE] )+ ``` -------------------------------- ### Environment Setup for Elango Source: https://github.com/valkey-io/valkey-search/blob/main/third_party/icu/source/data/unidata/changes.txt Sets environment variables for the Unicode data and ICU source paths for Elango's setup. ```bash export UNIDATA_ROOT=~/oss/unidata export UNICODE_DATA=$UNIDATA_ROOT/uni16/final export CLDR_SRC=~/oss/cldr/mine/src export ICU_ROOT=~/oss/icu export ICU_SRC=$ICU_ROOT export ICU_OUT=$ICU_ROOT export ICUDT=icudt76b export ICU4C_DATA_IN=$ICU_SRC/icu4c/source/data/in export ICU4C_UNIDATA=$ICU_SRC/icu4c/source/data/unidata export LD_LIBRARY_PATH=$ICU_OUT/icu4c/lib export UNICODE_TOOLS=~/oss/unicodetools/mine/src ``` -------------------------------- ### Build and Install Submodule Source: https://github.com/valkey-io/valkey-search/blob/main/submodules/CMakeLists.txt Builds a submodule using CMake and installs it. It handles setting CXX, C, and LD flags, including sanitizers if specified. Skips build if the hint file already exists. ```cmake function(build_submodule MODULE_NAME MODULE_CMAKE_ARGS HINT_FILE) if(NOT EXISTS "${HINT_FILE}") file(MAKE_DIRECTORY ${MODULES_DIR}/${MODULE_NAME}/build-release) if(UNIX AND NOT APPLE) set(CXX_FLAGS "-Wno-missing-requires -Wno-attributes -Wno-deprecated -Wno-return-type -Wno-stringop-overflow -Wno-deprecated-declarations" ) else() set(CXX_FLAGS "-Wno-attributes -Wno-deprecated -Wno-return-type -Wno-deprecated-declarations" ) endif() set(C_FLAGS "") set(LD_FLAGS "") if(SAN_BUILD) set(CXX_FLAGS "-fsanitize=${SAN_BUILD} ${CXX_FLAGS}") set(C_FLAGS "-fsanitize=${SAN_BUILD}") set(LD_FLAGS "-fsanitize=${SAN_BUILD}") endif() set(ENV{CXXFLAGS} ${CXX_FLAGS}) set(ENV{CFLAGS} ${C_FLAGS}) set(ENV{LDFLAGS} ${LD_FLAGS}) execute_process( COMMAND ${CMAKE_COMMAND} .. ${MODULE_CMAKE_ARGS} WORKING_DIRECTORY "${MODULES_DIR}/${MODULE_NAME}/build-release" RESULT_VARIABLE _PROC_RES) if(NOT _PROC_RES EQUAL 0) message(FATAL_ERROR "CMake configure error") endif() execute_process( COMMAND ${CMAKE_COMMAND} --build . -j ${PROCESSOR_COUNT} --target install WORKING_DIRECTORY "${MODULES_DIR}/${MODULE_NAME}/build-release" RESULT_VARIABLE _PROC_RES) if(NOT _PROC_RES EQUAL 0) message(FATAL_ERROR "Install error") endif() else() message(STATUS "Submodule ${MODULE_NAME} is already built and installed") endif() endfunction() ```