Testing Opensolr AI Search — Vector Search, AI Hints & Doc...
- Pin — Force a specific result to the top for a given search query
- Exclude — Hide a result completely so it never appears for that query
- Exclude All — Apply the rule globally, across every search query
- Drag & drop — Reorder pinned results to control exactly which one shows first
Try It Live
Test these demo search engines with real vector search. Use conceptual, intent-based queries:
- Office & Industrial Supplies (German, 85K+ products) — Search: "Dokumente zusammenheften"
- Home Improvement (500K+ products) — Search: "pellet heater"
- Luxury Accessories — Search: "winter hat"
- Jewelry Store — Search: "cute domestic pet jewelry"
- Vector Search Demo — Search: "what is going on with climate change"
Try these conceptual queries to see how vector similarity goes beyond keyword matching:
climate disasters hurricanes floods wildfiresspace exploration mars colonization economyancient microbes life beyond earth
Every demo page includes built-in dev tools — query parameter inspector, full Solr debugQuery output, crawl statistics, and search analytics.
Using the Solr API Directly
Direct API access for advanced users — learn more about hybrid search.
Example Solr endpoints (credentials: 123 / 123):
https://de9.solrcluster.com/solr/vector/select?wt=json&indent=true&q=*:*&rows=2 https://fi.solrcluster.com/solr/rueb/select?wt=json&indent=true&q=*:*&rows=2 https://chicago96.solrcluster.com/solr/peilishop/select?wt=json&indent=true&q=*:*&rows=2
Simple Lexical Query
curl -u 123:123 "https://de9.solrcluster.com/solr/vector/select?q=climate+change&rows=5&wt=json"
Pure Vector Query (KNN)
curl -u 123:123 "https://de9.solrcluster.com/solr/vector/select?q={!knn%20f=embeddings%20topK=50}[0.123,0.432,0.556,...]&wt=json"
Replace the vector array with your own embedding from the OpenSolr AI NLP API.
Hybrid Query (Lexical + Vector)
curl -u 123:123 "https://de9.solrcluster.com/solr/vector/select?q={!bool%20should=$lexicalQuery%20should=$vectorQuery}&lexicalQuery={!edismax%20qf=content}climate+change&vectorQuery={!knn%20f=embeddings%20topK=50}[0.12,0.43,0.66,...]&wt=json"
Combines traditional keyword scoring with semantic vector similarity — best of both worlds.
Getting Embeddings via OpenSolr API
Generate vector embeddings for any text using these endpoints:
function postEmbeddingRequest($email, $api_key, $core_name, $payload) { $apiUrl = "https://api.opensolr.com/solr_manager/api/embed"; $postFields = http_build_query([ 'email' => $email, 'api_key' => $api_key, 'index_name' => $core_name, 'payload' => is_array($payload) ? json_encode($payload) : $payload ]); $ch = curl_init($apiUrl); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postFields, CURLOPT_HTTPHEADER => ['Content-Type: application/x-www-form-urlencoded'], CURLOPT_TIMEOUT => 30, ]); $response = curl_exec($ch); curl_close($ch); return json_decode($response, true); }
The response includes the vector embedding array you can pass directly to Solr.
Code Examples
PHP
<?php $url = 'https://de9.solrcluster.com/solr/vector/select?wt=json'; $params = [ 'q' => '{!bool should=$lexicalQuery should=$vectorQuery}', 'lexicalQuery' => '{!edismax qf=content}climate disasters', 'vectorQuery' => '{!knn f=embeddings topK=50}[0.12,0.43,0.56,0.77]' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERPWD, '123:123'); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
Python
import requests from requests.auth import HTTPBasicAuth url = "https://de9.solrcluster.com/solr/vector/select" params = { 'q': '{!bool should=$lexicalQuery should=$vectorQuery}', 'lexicalQuery': '{!edismax qf=content}climate disasters', 'vectorQuery': '{!knn f=embeddings topK=50}[0.12,0.43,0.56,0.77]', 'wt': 'json' } response = requests.post(url, data=params, auth=HTTPBasicAuth('123', '123')) print(response.json())
JavaScript (AJAX)
<script> fetch('https://de9.solrcluster.com/solr/vector/select?wt=json&q={!knn%20f=embeddings%20topK=10}[0.11,0.22,0.33]', { headers: { 'Authorization': 'Basic ' + btoa('123:123') } }) .then(r => r.json()) .then(console.log); </script>
Quick Reference
- Adjust
topKto control how many similar results to retrieve (usually 20-100). - Use
{!bool should=...}for softer relevance mixing — vector similarity has more influence on ranking. - For best hybrid results, always combine both lexical and vector queries.
- All demo search pages include built-in query inspector, debugQuery, crawl stats, and search analytics.