Skip to main content

Interface: FacetedSearchQuery

Defined in: src/types/interfaces/search.interface.ts:210

Faceted search query with aggregations.

Extends

Properties

facets

readonly facets: readonly string[]

Defined in: src/types/interfaces/search.interface.ts:220

Facet dimensions to aggregate.

Remarks

Common facets:

  • "subjects" - Count by subject classification
  • "author" - Count by author
  • "year" - Count by publication year

filters?

readonly optional filters: object

Defined in: src/types/interfaces/search.interface.ts:119

Filters to apply.

author?

readonly optional author: DID

Filter by author DID.

dateFrom?

readonly optional dateFrom: Date

Filter by creation date range (from).

dateTo?

readonly optional dateTo: Date

Filter by creation date range (to).

subjects?

readonly optional subjects: readonly string[]

Filter by subject classifications.

Remarks

Filters are applied as boolean filters (not affecting scoring).

Inherited from

SearchQuery.filters


limit?

readonly optional limit: number

Defined in: src/types/interfaces/search.interface.ts:147

Maximum number of results to return.

Remarks

Default: 10. Maximum: 100.

Inherited from

SearchQuery.limit


offset?

readonly optional offset: number

Defined in: src/types/interfaces/search.interface.ts:155

Offset for pagination.

Remarks

For deep pagination, use search_after instead.

Inherited from

SearchQuery.offset


q

readonly q: string

Defined in: src/types/interfaces/search.interface.ts:111

Query string.

Remarks

Supports Elasticsearch query string syntax:

  • Simple: "neural networks"
  • Field-specific: "title:neural AND abstract:biology"
  • Wildcards: "neuro*"
  • Phrases: ""neural networks""

Inherited from

SearchQuery.q