### Install on Ubuntu Linux Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/search_server/README.md Steps to install Open Semantic Search Server on Ubuntu Linux. ```bash sudo apt install ./open-semantic-search-server*.deb q ``` -------------------------------- ### Switch to root user in terminal Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/desktop_search/README.md Command to get full root access in the terminal application. ```bash su ``` -------------------------------- ### Install on Debian GNU/Linux Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/search_server/README.md Steps to install Open Semantic Search Server on Debian GNU/Linux. ```bash su dpkg --install open-semantic-search-server*.deb apt-get -f install ``` -------------------------------- ### Start the build VM Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Start the build VM without using the full build script. ```bash vagrant up ``` -------------------------------- ### Install vagrant-reload plugin Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Install the vagrant-reload plugin for Vagrant. ```bash vagrant plugin install vagrant-reload ``` -------------------------------- ### Start Solr index service Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/cmd/README.md Command to start the Solr index service. ```bash service solr start ``` -------------------------------- ### Index some files Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/search_server/README.md Command to index files using Open Semantic Search. ```bash opensemanticsearch-index-dir /usr/share/doc ``` -------------------------------- ### Example: Process function implementation Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md An example implementation of the 'process' function within a plugin, showing how to access text size from parameters and append it to the 'textsize' facet in data. ```python # ... def process ( parameters={}, data={} ): # do some analyses, i.e. with text textsize = parameters[text'].size #write some analysis results to the index into a facet opensemanticsearch_connector.append(data, facet='textsize', values=textsize) #return return parameters, data ``` -------------------------------- ### Install Python dependencies from requirements.txt Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/README.md This command installs Python dependencies listed in the requirements.txt file, typically used during the installation of Debian/Ubuntu packages or Docker builds. ```bash pip3 install -r /usr/lib/python3/dist-packages/opensemanticetl/requirements.txt ``` -------------------------------- ### Access the search interface Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/search_server/README.md URL to access the Open Semantic Search interface in a browser. ```bash http://localhost/search ``` -------------------------------- ### Run docker containers Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/README.md Starts all Docker images, dependencies, and services using docker-compose. ```bash docker-compose up ``` -------------------------------- ### Install Open Semantic Search Server Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/download/README.md Command to install the Open Semantic Search Server package on Debian or Ubuntu based Linux systems. ```bash apt install open-semantic-search ``` -------------------------------- ### Example command line usage for custom configuration Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/etl/README.md This command shows how to specify a custom configuration file for the ETL process. ```bash etl-file --config */etc/etl/MyCustomConfig* *filename* ``` -------------------------------- ### Commandline Usage Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/connector/rss/README.md Example of using the commandline to index an RSS feed. ```bash opensemanticsearch-index-rss *http://www.opensemanticsearch.org/feed* ``` -------------------------------- ### Exit console Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/desktop_search/README.md Command to exit the root console session. ```bash exit ``` -------------------------------- ### Install Scantailor Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/config/ocr/README.md Command to install the Scantailor package on Debian-based Linux distributions. ```bash apt-get install scantailor ``` -------------------------------- ### CSV Export Example Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/etl/export/csv/README.md Example of setting the Solr result writer to CSV format using the `wt` parameter. ```bash localhost:8983/solr/core1/select?q=*:*&wt=csv ``` -------------------------------- ### Set root password Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/install/desktop_search/README.md Command to set a root password after logging in as root without a password. ```bash passwd ``` -------------------------------- ### Example: Aborting processing Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md Shows how to set a parameter to 'True' to stop further processing and indexing of the current document. ```python parameters['break'] = True ``` -------------------------------- ### Example: Writing to data facet Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md Demonstrates how to add custom tags and location information to the 'data' variable for indexing. ```python data['tags'] = 'myTopic' data['location'] = 'Berlin' ``` -------------------------------- ### Configure remote API address Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/trigger/filemonitoring/README.md Example configuration snippet showing how to set the remote search server API address. ```python config['api'] = "http://192.168.1.1/search-apps/api" ``` -------------------------------- ### Example of a custom regular expression for dollar amounts Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/enhancer/regex/README.md This example shows how to define a regular expression to capture dollar amounts and assign them to a specific facet named 'dollar_ss'. Lines starting with '#' are comments. ```regex # Write text like *1000.00 $* or *100$* to the facet *dollar_ss* [0-9]+[\.,]?[0-9]*[:blank:]*\$ dollar_ss ``` -------------------------------- ### Example: Reading parameters Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md Shows how to print the 'parameters' variable, which contains configuration and analysis results from previous plugins. ```python print parameters ``` -------------------------------- ### Get a shell inside the VM Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Get a shell running inside the VM. ```bash vagrant ssh ``` -------------------------------- ### Build the VM Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Build the Open Semantic Desktop Search VM using the build script. ```bash ./build.sh ``` -------------------------------- ### Proximity Search Example Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/search/fuzzy/README.md Example of how to perform a proximity search to find name variants with additional words in between. ```text "Barack Obama"~2 ``` -------------------------------- ### Example: Reading config options Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md Demonstrates how a plugin can read custom configuration options passed from the connector's configuration. ```python config['myOwnEnhancerName'] = 'Own Enhancer' ``` -------------------------------- ### Get root access inside the VM Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Get root access within the VM shell. ```bash sudo su ``` -------------------------------- ### Install Tesseract OCR Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/admin/config/ocr/README.md Command to install the Tesseract OCR package on Debian-based Linux distributions. ```bash apt-get install tesseract-ocr ``` -------------------------------- ### Index RDF file using command line tool Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/connector/rdf/README.md Example of using the opensemanticsearch-index-file command line tool to index an RDF file. ```bash opensemanticsearch-index-file ``` -------------------------------- ### Example: Data structure after enhancer Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md Shows an example of the 'data' variable after several enhancer plugins have added their results, including content type, filesize, tags, and email addresses. ```json { 'content_type': 'application/pdf', 'filesize': 12345, 'tags': {'Open Source', 'Free software'}, 'email_ss': { 'info@opensemanticsearch.org', 'support@opensemanticsearch.org' } } ``` -------------------------------- ### Example Python Plugin Structure Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/dev/enhancer/python/README.md This is a basic example of a Python plugin that processes parameters and data, appends a calculated value to the data facet, and returns the processed parameters and data. ```python import etl class myOwnEnhancerName(object): def process ( parameters={}, data={} ): # do some analyses, i.e. with text uri_length = len ( parameters['id'] ) #write some analysis results to the index into a facet etl.append(data, facet='uri_length_i', values=uri_length) #return results return parameters, data ``` -------------------------------- ### Example of extracting a specific group from a regular expression Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/enhancer/regex/README.md This example demonstrates how to extract only a specific part (a captured group) of a regular expression match. Here, it extracts the numerical part of a size measurement. ```regex Size of ([0-9]+)[:blank:]?m size_ss 1 ``` -------------------------------- ### REST-API Usage Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/connector/rss/README.md Example of using the REST-API to index an RSS feed. ```bash http://127.0.0.1/search-apps/api/index-rss?uri=*http://www.opensemanticsearch.org/feed* ``` -------------------------------- ### Command line tool for indexing Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/search/README.md This command can be used to start a crawl for indexing documents if it's not done automatically. ```bash searchd --crawl /path/to/your/documents ``` -------------------------------- ### Open Semantic ETL Python Script Example Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/connector/db/README.md Example of how to use Open Semantic ETL to import data from a SQL database to a search index. The script should write columns to the 'data' variable (a Python dictionary) and then call etl.process(data=data). ```python import open_semantic_etl as etl # ... (code to fetch data from SQL database) ... data = { "column1": "value1", "column2": "value2" } etl.process(data=data) ``` -------------------------------- ### Build docker images Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/README.md Builds the Docker images using the default docker-compose configuration. ```bash docker-compose build ``` -------------------------------- ### Replay playbook Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/src/open-semantic-desktop-search/README.md Replay the Ansible playbook after fixing bugs. ```bash vagrant provision ``` -------------------------------- ### Boolean Operators Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/docs/doc/search/operators/README.md Examples of using AND, OR, and NOT/(-) operators to combine search terms. ```text search engine search AND engine ``` ```text search OR research ``` ```text search -engine search NOT engine search AND NOT engine ``` -------------------------------- ### Integration tests - Build and Run Source: https://github.com/opensemanticsearch/open-semantic-search/blob/master/README.md Builds and runs integration tests within the docker-compose environment. ```bash docker-compose -f docker-compose.etl.test.yml build docker-compose -f docker-compose.etl.test.yml up ```