### Install Tantivy-Go Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs the tantivy-go library using the Go package manager. Ensure your Go environment is set up correctly. ```go go get github.com/anyproto/tantivy-go ``` -------------------------------- ### Install Windows Cross-Compiler Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs the MinGW-w64 cross-compiler for Windows development on macOS using Homebrew. ```shell brew install mingw-w64 ``` -------------------------------- ### Install Musl Cross-Compiler Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs the x86_64-unknown-linux-musl cross-compiler for Linux development on macOS using Homebrew. ```shell brew tap messense/macos-cross-toolchains && brew install x86_64-unknown-linux-musl ``` -------------------------------- ### Install Rust Libraries (Release) Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs release versions of Rust libraries for all supported platforms. This command is executed within the 'rust' folder. ```bash make install-all ``` -------------------------------- ### Install Rust Libraries (Debug) Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs debug versions of Rust libraries for all supported platforms. This command is executed within the 'rust' folder. ```bash make install-debug-all ``` -------------------------------- ### Install Specific Rust Library Version Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs a release version of Rust libraries for a specific architecture and GOOS (e.g., 'amd64-linux'). This command is executed within the 'rust' folder. ```bash make install-ARCH-GOOS ``` -------------------------------- ### Install Specific Rust Library Version (Debug) Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Installs a debug version of Rust libraries for a specific architecture and GOOS (e.g., 'amd64-linux'). This command is executed within the 'rust' folder. ```bash make install-debug-ARCH-GOOS ``` -------------------------------- ### Download Tantivy Binaries Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Downloads all necessary Tantivy binaries for development. This command should be run within the 'rust' folder of the project. ```bash make download-tantivy-all ``` -------------------------------- ### Configure and Run Rust Index Creation Source: https://github.com/anyproto/tantivy-go/blob/main/testquality/README.md Sets up and runs the Rust application for index creation. Key configurations include matching the stemmer to the selected language and ensuring other settings are appropriate. ```rust # Ensure the stemmer corresponds to the selected language. # Other configurations are set appropriately. # Run the Rust application: # cargo run ``` -------------------------------- ### Prepare Index (Python) Source: https://github.com/anyproto/tantivy-go/blob/main/testquality/README.md Configures and runs a Python script to prepare the search index. This involves setting file paths for relevance data and queries based on the selected language. ```python # Configure paths for relevance_file and queries_file # Run the script: # python prepare_index.py ``` -------------------------------- ### Configure and Run Go Test Source: https://github.com/anyproto/tantivy-go/blob/main/testquality/README.md Adjusts settings and executes the Go application for testing. Users can configure the number of results ('k'), the language, and the search method (tantivySearch or searchJson). ```go // Adjust the following settings: // k value: Change the number of results you want to evaluate. // Language: Set the language to match the dataset used (e.g., "en" for English). // Search Method: Choose between tantivySearch or searchJson. // Run the Go application: // go run main.go ``` -------------------------------- ### Compile All Tantivy Versions with Nix Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Executes scripts provided by the Nix shell to compile all Tantivy versions (GCC and Musl). These scripts build the Rust library, copy it to a target directory, and build related components. ```bash tantivy_compile_all_gcc tantivy_compile_all_musl ``` -------------------------------- ### Nix Development Shell Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Enters a Nix development shell that provides all necessary build dependencies for compiling Tantivy. This shell includes scripts for building Rust libraries and integrating with other projects. ```nix nix develop . ``` -------------------------------- ### Troubleshooting SIGSEGV with Musl/Windows Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Provides linker flags to add for resolving SIGSEGV issues when using musl or Windows targets. These flags increase the stack size and ensure static linking. ```shell -extldflags '-static -Wl,-z stack-size=1000000' ``` -------------------------------- ### Add Android Development Tools to PATH Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Appends the Android SDK's tools, emulator, platform-tools, and NDK bin directories to the system's PATH environment variable. This is crucial for Android development workflows. ```shell export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin ``` -------------------------------- ### Prepare Corpus Data (Python) Source: https://github.com/anyproto/tantivy-go/blob/main/testquality/README.md Prepares the cloned corpus data using a Python script. It involves setting the target language and running the script to process the dataset for indexing. ```python lang = 'en' # Example: English # Run the script: # python extract_corpus.py ``` -------------------------------- ### Validate Minimum macOS Version Source: https://github.com/anyproto/tantivy-go/blob/main/README.md Checks the minimum macOS version required by the compiled library using 'otool'. The output should indicate '11.0'. ```shell otool -l libtantivy_go.a | rg LC_BUILD_VERSION -A4 | rg minos | sort | uniq -c ``` -------------------------------- ### Clone Corpus Data Source: https://github.com/anyproto/tantivy-go/blob/main/testquality/README.md Clones the MIRACL dataset from Hugging Face, which is used for testing Tantivy's search quality. This step is crucial for obtaining the necessary data for subsequent preparation. ```bash git clone https://huggingface.co/datasets/miracl/miracl ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.