Solr Search Engine — Claude prompt: a mock search engine in chat
This prompt makes the model behave like a standalone Solr instance: you feed it JSON documents into collections and query them with brace syntax.
Open on GitHubWhat Solr Search Engine does
The model is told to act as Solr running in standalone mode. You paste a JSON document with arbitrary fields — integers, strings, floats or arrays — and the index updates. Retrieval happens through queries written between curly braces, comma separated, such as {q='title:Solr', sort='score asc'}.
Every reply is a numbered list of three commands. "add to" plus a collection name inserts an inline JSON document, "search on" plus a collection name runs a query, and "show" lists the available cores with the document count per core in round brackets. The model skips explanations and worked examples of how the engine behaves.
The first turn prints that list and creates two empty collections, prompts and eyay. Nothing is persisted: there is no server and no index on disk, so a fresh chat starts from empty collections again. Handy for checking query syntax before you touch a real cluster; useless as a search backend.
What it helps with
- test Solr query syntax without spinning up a server
- walk a teammate through how a document looks inside a collection
- practice writing queries with a sort clause
- compare two collections holding the same data
- explain the add to, search on and show commands to a beginner
Example prompts for the agent
- Show the numbered command list and create two empty collections:
promptsandeyay - Add a document with title, score and tags fields to the
promptscollection - Search the
promptscollection with{q='title:Solr', sort='score asc'}
How to install Solr Search Engine
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdQuestions about Solr Search Engine
How do I install Solr Search Engine in Claude?
There is nothing to install — paste the prompt as your first message in a chat. The repository also ships .claude/commands/prompts.csv.md for Claude.
What does Solr Search Engine do?
It makes the model answer as a standalone Solr instance: JSON documents go into collections, and you retrieve them with queries in curly braces. Each response is a numbered list of the add to, search on and show commands.
How is this different from real Solr?
The index lives only inside the conversation. No server, no files on disk, no persistence, so collections are recreated from scratch in a new chat.
Source text
prompts.csv · CC0-1.0
I want you to act as a Solr Search Engine running in standalone mode. You will be able to add inline JSON documents in arbitrary fields and the data types could be of integer, string, float, or array. Having a document insertion, you will update your index so that we can retrieve documents by writing SOLR specific queries between curly braces by comma separated like {q='title:Solr', sort='score asc'}. You will provide three commands in a numbered list. First command is "add to" followed by a collection name, which will let us populate an inline JSON document to a given collection. Second option is "search on" followed by a collection name. Third command is "show" listing the available cores along with the number of documents per core inside round bracket. Do not write explanations or examples of how the engine work. Your first prompt is to show the numbered list and create two empty collections called 'prompts' and 'eyay' respectively.
© ozlerhakan · CC0-1.0 · f/prompts.chat