Hyperspace Docs
Hyperspace Homepage
  • Getting started
    • Overview
      • Hyperspace Advantages
      • Hyperspace Search
    • Quick Start
  • flows
    • Setting Up
      • Installing the Hyperspace API Client
      • Connecting to the Hyperspace Server
      • Creating a Database Schema Configuration File
        • Vector Similarity Metrics
        • Index Type Methods
      • Creating a Collection
      • Uploading Data to a Collection
      • Building and Running Queries
        • Building a Lexical Search Query
        • Building a Vector Search Query
        • Building a Hybrid Search Query
      • Retrieving Results
    • Data Collections
      • Uploading Data
      • Accessing Data
      • Supported Data Types
    • Queries
      • DSL Query interface
        • Aggregations
        • Bool Query
        • Candidate Generation and Metadata Filtering
        • Scoring and Ranking
  • Reference
    • Hyperspace Query Flow
    • Features and Benefits
    • Search Processing Unit (SPU)
    • Hyperspace Document Prototype
  • API Documentation
    • Hyperspace Client
      • add_batch
      • add_document
      • async_req
      • clear_collection
      • collections_info
      • commit
      • create_collection
      • delete_collection
      • delete_by_query
      • dsl_search
      • get_schema
      • get_document
      • reset_password
      • search
      • update_by_query
      • update_document
    • DSL Query Framework
      • Aggregations
        • Cardinality Aggregation
        • Date Histogram
        • Metric Aggregations
        • Terms Aggregation
      • Bool Queries
        • Free Text Search
        • 'match' Clause
        • 'filter' Clause
        • 'must' Clause
        • 'must_not' Clause
        • 'should' Clause
        • 'should_not' Clause
      • Candidate Generation and Metadata Filtering
        • Geo Coordinates Match
        • Range Match
        • Term Match
      • Scoring and Ranking
        • Boost
        • 'dis_max'
        • Function Score
        • Rarity Score (TF-IDF)
  • Releases
    • 2024 Releases
Powered by GitBook
On this page
  1. API Documentation
  2. Hyperspace Client

async_req

the async_req key can be used in order to run commands in an non-synchronic manner. By default when a command is submitted, the system awaits the client response. The async_req key allows to change this behavior and run multiple processes simultaneously.

Input

  • (Boolean) - True if not to wait for server response, False otherwise.

Example -

new_document= {"id": "131",
               "name": "dave",
                "age": 43}

hyperspace_client.update_document(body=new_document, 
                                  collection_name='partial_update', 
                                  async_req=True);
Document doc = new Document();
doc.setId("131");
doc.putAdditionalProperty("name", "dave");
doc.putAdditionalProperty("age", 43);

boolean partialUpdate = true;
boolean docAsUpsert = true;                        
hyperspaceClient.updateDocument(new_document, collection_name, partialUpdate, docAsUpsert, async_req=True);
const new_document= {"id": "131",
                        "name": "dave",
                         "age": 43}
const partialUpdate = true;
const docAsUpsert = true;

await hyperspaceClient.updateDocument(collectionName, new_document, async_req=True);

In the above example, the document with the id corresponding to new_doc["id"] will be updated in a non synchronic manner.

Previousadd_documentNextclear_collection

Last updated 10 months ago