Send processed data from Unstructured to Qdrant.

The requirements are as follows.

  • For the Unstructured Platform, only Qdrant Cloud is supported.

  • For Unstructured Ingest, Qdrant Cloud, Qdrant local, and Qdrant client-server are supported.

  • For Qdrant local, the path to the local Qdrant installation, for example: /qdrant/local

  • For Qdrant client-server, the Qdrant server URL, for example: http://localhost:6333

  • For Qdrant Cloud:

    • A Qdrant account.

    • A Qdrant cluster.

    • The cluster’s URL. To get this URL, do the following:

      1. Sign in to your Qdrant Cloud account.
      2. On the sidebar, under Dashboard, click Clusters.
      3. Click the cluster’s name.
      4. Note the value of the Endpoint field, for example: https://<random-guid>.<region-id>.<cloud-provider>.cloud.qdrant.io.
    • A Qdrant API key.

  • The name of the target collection on the Qdrant local installation, Qdrant server, or Qdrant Cloud cluster.

    Qdrant requires the target collection to exist before Unstructured can write to the collection. The following example code demonstrates the use of the Python Qdrant Client to create a collection on a Qdrant Cloud cluster, configuring the collection for vectors with 3072 dimensions:

    Python
    from qdrant_client import QdrantClient, models
    import os
    
    client = QdrantClient(
        url=os.getenv("QDRANT_URL"),
        api_key=os.getenv("QDRANT_API_KEY")
    )
    
    client.create_collection(
        collection_name=os.getenv("QDRANT_COLLECTION"),
        vectors_config=models.VectorParams(
            size=3072,
            distance=models.Distance.COSINE
        )
    )
    
    collection = client.get_collection(
                     collection_name=os.getenv("QDRANT_COLLECTION")
                 )
    
    print(f"The collection named '{os.getenv("QDRANT_COLLECTION")}' exists and " +
          f"has a status of '{collection.status}'.")
    

To create or change a Qdrant destination connector, see the following examples.

Replace the preceding placeholders as follows:

  • <name> (required) - A unique name for this connector.
  • <url> (required) - The Qdrant cluster’s URL.
  • <collection-name> (required) - The name of the target collection on the Qdrant cluster.
  • <batch-size> - The maximum number of records to transmit at a time. The default is 50 if not otherwise specified.
  • <api-key> (required) - The Qdrant API key.

To change a connector, replace <connector-id> with the source connector’s unique ID. To get this ID, see List source connectors.