LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraphindexSearchOperation
Interface●Since v0.3

SearchOperation

Operation to search for items within a namespace prefix.

Copy
interface SearchOperation

Properties

property
filter: Record<string, any>

Key-value pairs to filter results based on exact matches or comparison operators.

Supports both exact matches and operator-based comparisons:

  • $eq: Equal to (same as direct value comparison)
  • $ne: Not equal to
  • $gt: Greater than
  • $gte: Greater than or equal to
  • $lt: Less than
  • $lte: Less than or equal to
Copy
// Exact match
filter: { status: "active" }

// With operators
filter: { score: { $gt: 4.99 } }

// Multiple conditions
filter: {
  score: { $gte: 3.0 },
  color: "red"
}
property
limit: number
property
namespacePrefix: string[]

Hierarchical path prefix to search within. Only items under this prefix will be searched.

Copy
// Search all user documents
namespacePrefix: ["users", "documents"]

// Search everything
namespacePrefix: []
property
offset: number
property
query: string

Natural language search query for semantic search. When provided, results will be ranked by relevance to this query using vector similarity search.

Copy
// Find technical documentation about APIs
query: "technical documentation about REST APIs"

// Find recent ML papers
query: "machine learning papers from 2023"
View source on GitHub