Company Logo
MCIP

Test Search

MCIP understands what you mean, not just what you type. Let's explore natural language search.

If you've completed the setup guide, you're ready to search. Let's start simple:

curl "http://localhost:8080/search?q=laptop"

You'll get something like:

{
  "meta": {
    "count": 5,
    "take": 10,
    "skip": 0,
    "q": "laptop"
  },
  "items": [
    {
      "externalId": "prod_001",
      "title": "Gaming Laptop Pro 15",
      "description": "High-performance gaming notebook...",
      "brand": "TechCorp",
      "category": "Electronics",
      "price": { "amount": 1299.99, "currency": "USD" },
      "mainImage": "https://cdn.example.com/laptop.jpg",
      "score": 0.923
    }
  ]
}

Understanding the Score

The score (0-1) measures semantic similarity — how well the product matches your intent, not just keywords.

ScoreMeaning
0.9+Excellent match
0.7-0.9Good match
0.5-0.7Related
<0.5Weak match

Natural Language Queries

Here's where MCIP shines. Try these:

Price Filters

# Under a specific price
curl "http://localhost:8080/search?q=laptop+under+1000"

# Price range
curl "http://localhost:8080/search?q=shoes+between+50+and+100"

Brand Filters

# Include a brand
curl "http://localhost:8080/search?q=nike+running+shoes"

# Exclude a brand
curl "http://localhost:8080/search?q=smartphones+except+apple"

Combined Filters

# The real power — combine everything
curl "http://localhost:8080/search?q=nike+shoes+under+100+but+not+running"

MCIP extracts filters automatically and applies them during search.


Response Breakdown

Let's decode a full response:

{
  "meta": {
    "count": 3,
    "take": 10,
    "skip": 0,
    "q": "nike shoes under 100",
    "filteringStatus": "AI_FILTERED",
    "appliedFilters": {
      "brand": ["Nike"],
      "priceRange": {
        "min": null,
        "max": 100,
        "currency": "UAH"
      }
    }
  },
  "items": [...]
}

Filtering Status

StatusMeaning
AI_FILTEREDFilters extracted and applied
RAG_ONLYPure semantic search, no filters

Pagination

Large result sets need pagination:

# First page (10 results)
curl "http://localhost:8080/search?q=electronics&take=10&skip=0"

# Second page
curl "http://localhost:8080/search?q=electronics&take=10&skip=10"

# Third page
curl "http://localhost:8080/search?q=electronics&take=10&skip=20"

Try These Searches

Test MCIP's semantic understanding:

QueryWhat MCIP Understands
gaming laptopLaptops optimized for gaming, not just containing "gaming"
comfortable office chairErgonomic features, not just keywords
gift for momPopular gift categories, affordable items
wireless headphones for runningSport-focused, secure fit, sweat resistant
laptop for video editingHigh RAM, good GPU, large screen

The difference? Keyword search finds "gaming laptop" only if those exact words appear. MCIP finds "High-Performance Notebook for Games" too.


Traditional keyword search:

  • ✗ "laptop for work" misses "business notebook"
  • ✗ "cheap phone" misses "budget smartphone"
  • ✗ "comfy shoes" misses "comfortable footwear"

MCIP semantic search:

  • ✓ Understands synonyms and intent
  • ✓ Matches conceptually related products
  • ✓ Extracts implicit filters from natural language

Quick CLI Reference

# Basic search
curl "http://localhost:8080/search?q=your+query"

# With pagination
curl "http://localhost:8080/search?q=query&take=20&skip=0"

# URL encode complex queries
curl "http://localhost:8080/search?q=$(echo 'nike shoes under $100' | jq -sRr @uri)"

# Pretty print with jq
curl -s "http://localhost:8080/search?q=laptop" | jq .

# Just get titles and scores
curl -s "http://localhost:8080/search?q=laptop" | jq '.items[] | {title, score}'

Troubleshooting

"No results found"

Possible causes:

  1. Products haven't synced yet — run /admin/sync and wait 30 seconds
  2. Query too specific — try broader terms
  3. No matching products in catalog

Low relevance scores

Possible causes:

  1. Query doesn't match product descriptions
  2. Missing keywords in product data
  3. Try rephrasing the query

Filters not applying

Check:

  1. Brand names must match exactly (case-insensitive)
  2. Price currency must match your store's currency
  3. Review appliedFilters in the response