NewMCP ServerView docs
Getting Started

First Search Query

Learn how to make your first search query and understand the results.

4 min readUpdated 2026-01-12

Your First Search Query

Now that you have the SDK installed and documents uploaded, let's make your first search query.

Basic Search

The simplest search uses just a query string:

python
results = client.search(query="quarterly revenue report")

for doc in results:
    print(f"Title: {doc.title}")
    print(f"Score: {doc.score}")
    print(f"Content: {doc.content[:200]}...")
    print("---")

Understanding Results

Each result contains:

FieldDescription
idUnique document identifier
titleDocument title
contentMatched text content
scoreRelevance score (0-1)
metadataCustom metadata

Filtering Results

Add filters to narrow your search:

python
results = client.search(
    query="budget analysis",
    filters={
        "department": "finance",
        "year": 2025
    },
    limit=10
)

Hybrid Search Options

Enable different retrieval methods:

python
results = client.search(
    query="customer feedback analysis",
    options={
        "retrieval": "hybrid",  # dense + sparse + bm25
        "rerank": True,         # Enable reranking
        "weights": {
            "dense": 0.5,
            "sparse": 0.3,
            "bm25": 0.2
        }
    }
)

Next Steps