# pub.chive.graph.browseFaceted

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.browseFaceted)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.browseFaceted/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.browseFaceted/examples)

## Definitions

### `pub.chive.graph.browseFaceted`

**Type**: `query`

Browse eprints using dynamic faceted classification from the knowledge graph

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `q` | `string` | No | Optional text query |
| `limit` | `integer` | No | Maximum results to return |
| `cursor` | `string` | No | Pagination cursor |
| `facets` | `string` | No | JSON-encoded facet filters keyed by facet slug (e.g., {"methodology":["meta-analysis"]}) |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `hits` | `array` | Yes | Matching eprints |
| `total` | `integer` | Yes | Total count of matching eprints |
| `cursor` | `string` | No | Pagination cursor for next page |
| `facets` | `array` | Yes | Available facet refinements |
| `hasMore` | `boolean` | Yes | Whether more results exist |
| `impressionId` | `string` | No | Impression ID for click tracking |

### `pub.chive.graph.browseFaceted#fieldRef`

**Type**: `object`

Subject field reference

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | No | Field identifier |
| `uri` | `string` (at-uri) | Yes | Field AT-URI |
| `label` | `string` | Yes | Field label |
| `parentUri` | `string` (at-uri) | No | Parent field AT-URI |

### `pub.chive.graph.browseFaceted#authorRef`

**Type**: `object`

Author reference with contributions

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No | Author DID |
| `name` | `string` | Yes | Display name |
| `email` | `string` | No | Contact email |
| `orcid` | `string` | No | ORCID identifier |
| `order` | `integer` | Yes | Author order (1-based) |
| `handle` | `string` | No | ATProto handle |
| `avatarUrl` | `string` | No | Avatar image URL |
| `affiliations` | `array` | Yes | Author affiliations |
| `contributions` | `array` | Yes | CRediT contributions |
| `isHighlighted` | `boolean` | No | Whether this author should be highlighted |
| `isCorrespondingAuthor` | `boolean` | No | Whether this is the corresponding author |

### `pub.chive.graph.browseFaceted#facetValue`

**Type**: `object`

Facet value with count

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | Yes | Number of eprints with this value |
| `label` | `string` | No | Display label |
| `value` | `string` | Yes | Facet value |

### `pub.chive.graph.browseFaceted#sourceInfo`

**Type**: `object`

Source PDS information

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `stale` | `boolean` | No | Whether data is potentially stale |
| `blobUrl` | `string` | No | Blob URL |
| `recordUrl` | `string` | No | Direct record URL |
| `pdsEndpoint` | `string` | Yes | PDS endpoint URL |
| `lastVerifiedAt` | `string` (datetime) | No | Last verification timestamp |

### `pub.chive.graph.browseFaceted#eprintSummary`

**Type**: `object`

Eprint summary for faceted browse results

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` | Yes | CID of indexed version |
| `uri` | `string` (at-uri) | Yes | Eprint AT-URI |
| `score` | `integer` | No | Relevance score (scaled by 1000 for 0.0-1.0 range) |
| `title` | `string` | Yes | Eprint title |
| `fields` | `array` | No | Subject fields |
| `source` | `ref` → `#sourceInfo` | Yes | Source PDS information |
| `authors` | `array` | Yes | All authors with contributions |
| `license` | `string` | Yes | License identifier |
| `abstract` | `array` | Yes | Rich abstract with text, formatting, and entity references |
| `keywords` | `array` | No | Keywords |
| `paperDid` | `string` (did) | No | Paper DID if paper has its own PDS |
| `createdAt` | `string` (datetime) | Yes | Creation timestamp |
| `indexedAt` | `string` (datetime) | Yes | Index timestamp |
| `highlights` | `unknown` | No | Search highlights keyed by field |
| `submittedBy` | `string` (did) | Yes | DID of human user who submitted |

### `pub.chive.graph.browseFaceted#contributionRef`

**Type**: `object`

CRediT contribution

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `degree` | `string` | No | Degree of contribution |
| `typeId` | `string` | Yes | Contribution type identifier |
| `typeUri` | `string` (at-uri) | Yes | AT-URI of contribution type node |
| `typeLabel` | `string` | Yes | Contribution type label |

### `pub.chive.graph.browseFaceted#facetDefinition`

**Type**: `object`

Facet definition from the knowledge graph

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `slug` | `string` | Yes | Facet slug identifier |
| `label` | `string` | Yes | Display label |
| `values` | `array` | Yes | Available values with counts |
| `description` | `string` | No | Facet description |

## Raw Schema

```json
{
  "id": "pub.chive.graph.browseFaceted",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "hits",
            "facets",
            "hasMore",
            "total"
          ],
          "properties": {
            "hits": {
              "type": "array",
              "items": {
                "ref": "#eprintSummary",
                "type": "ref"
              },
              "description": "Matching eprints"
            },
            "total": {
              "type": "integer",
              "description": "Total count of matching eprints"
            },
            "cursor": {
              "type": "string",
              "description": "Pagination cursor for next page"
            },
            "facets": {
              "type": "array",
              "items": {
                "ref": "#facetDefinition",
                "type": "ref"
              },
              "description": "Available facet refinements"
            },
            "hasMore": {
              "type": "boolean",
              "description": "Whether more results exist"
            },
            "impressionId": {
              "type": "string",
              "description": "Impression ID for click tracking"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "q": {
            "type": "string",
            "description": "Optional text query"
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum results to return"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "facets": {
            "type": "string",
            "description": "JSON-encoded facet filters keyed by facet slug (e.g., {\"methodology\":[\"meta-analysis\"]})"
          }
        }
      },
      "description": "Browse eprints using dynamic faceted classification from the knowledge graph"
    },
    "fieldRef": {
      "type": "object",
      "required": [
        "uri",
        "label"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Field identifier"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "Field AT-URI"
        },
        "label": {
          "type": "string",
          "description": "Field label"
        },
        "parentUri": {
          "type": "string",
          "format": "at-uri",
          "description": "Parent field AT-URI"
        }
      },
      "description": "Subject field reference"
    },
    "authorRef": {
      "type": "object",
      "required": [
        "name",
        "order",
        "affiliations",
        "contributions"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "Author DID"
        },
        "name": {
          "type": "string",
          "description": "Display name"
        },
        "email": {
          "type": "string",
          "description": "Contact email"
        },
        "orcid": {
          "type": "string",
          "description": "ORCID identifier"
        },
        "order": {
          "type": "integer",
          "description": "Author order (1-based)"
        },
        "handle": {
          "type": "string",
          "description": "ATProto handle"
        },
        "avatarUrl": {
          "type": "string",
          "description": "Avatar image URL"
        },
        "affiliations": {
          "type": "array",
          "items": {
            "ref": "pub.chive.defs#affiliation",
            "type": "ref"
          },
          "description": "Author affiliations"
        },
        "contributions": {
          "type": "array",
          "items": {
            "ref": "#contributionRef",
            "type": "ref"
          },
          "description": "CRediT contributions"
        },
        "isHighlighted": {
          "type": "boolean",
          "description": "Whether this author should be highlighted"
        },
        "isCorrespondingAuthor": {
          "type": "boolean",
          "description": "Whether this is the corresponding author"
        }
      },
      "description": "Author reference with contributions"
    },
    "facetValue": {
      "type": "object",
      "required": [
        "value",
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "description": "Number of eprints with this value"
        },
        "label": {
          "type": "string",
          "description": "Display label"
        },
        "value": {
          "type": "string",
          "description": "Facet value"
        }
      },
      "description": "Facet value with count"
    },
    "sourceInfo": {
      "type": "object",
      "required": [
        "pdsEndpoint"
      ],
      "properties": {
        "stale": {
          "type": "boolean",
          "description": "Whether data is potentially stale"
        },
        "blobUrl": {
          "type": "string",
          "description": "Blob URL"
        },
        "recordUrl": {
          "type": "string",
          "description": "Direct record URL"
        },
        "pdsEndpoint": {
          "type": "string",
          "description": "PDS endpoint URL"
        },
        "lastVerifiedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Last verification timestamp"
        }
      },
      "description": "Source PDS information"
    },
    "eprintSummary": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "title",
        "abstract",
        "authors",
        "submittedBy",
        "license",
        "createdAt",
        "indexedAt",
        "source"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "description": "CID of indexed version"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "Eprint AT-URI"
        },
        "score": {
          "type": "integer",
          "maximum": 1000,
          "minimum": 0,
          "description": "Relevance score (scaled by 1000 for 0.0-1.0 range)"
        },
        "title": {
          "type": "string",
          "description": "Eprint title"
        },
        "fields": {
          "type": "array",
          "items": {
            "ref": "#fieldRef",
            "type": "ref"
          },
          "description": "Subject fields"
        },
        "source": {
          "ref": "#sourceInfo",
          "type": "ref",
          "description": "Source PDS information"
        },
        "authors": {
          "type": "array",
          "items": {
            "ref": "#authorRef",
            "type": "ref"
          },
          "description": "All authors with contributions"
        },
        "license": {
          "type": "string",
          "description": "License identifier"
        },
        "abstract": {
          "type": "array",
          "items": {
            "refs": [
              "pub.chive.richtext.defs#textItem",
              "pub.chive.richtext.defs#nodeRefItem",
              "pub.chive.richtext.defs#wikidataRefItem",
              "pub.chive.richtext.defs#fieldRefItem",
              "pub.chive.richtext.defs#facetRefItem",
              "pub.chive.richtext.defs#eprintRefItem",
              "pub.chive.richtext.defs#annotationRefItem",
              "pub.chive.richtext.defs#authorRefItem",
              "pub.chive.richtext.defs#mentionItem",
              "pub.chive.richtext.defs#linkItem",
              "pub.chive.richtext.defs#tagItem",
              "pub.chive.richtext.defs#latexItem",
              "pub.chive.richtext.defs#codeBlockItem",
              "pub.chive.richtext.defs#headingItem",
              "pub.chive.richtext.defs#listItem",
              "pub.chive.richtext.defs#blockquoteItem"
            ],
            "type": "union"
          },
          "maxLength": 500,
          "description": "Rich abstract with text, formatting, and entity references"
        },
        "keywords": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keywords"
        },
        "paperDid": {
          "type": "string",
          "format": "did",
          "description": "Paper DID if paper has its own PDS"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "Creation timestamp"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Index timestamp"
        },
        "highlights": {
          "type": "unknown",
          "description": "Search highlights keyed by field"
        },
        "submittedBy": {
          "type": "string",
          "format": "did",
          "description": "DID of human user who submitted"
        }
      },
      "description": "Eprint summary for faceted browse results"
    },
    "contributionRef": {
      "type": "object",
      "required": [
        "typeUri",
        "typeId",
        "typeLabel"
      ],
      "properties": {
        "degree": {
          "type": "string",
          "description": "Degree of contribution",
          "knownValues": [
            "lead",
            "equal",
            "supporting"
          ]
        },
        "typeId": {
          "type": "string",
          "description": "Contribution type identifier"
        },
        "typeUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of contribution type node"
        },
        "typeLabel": {
          "type": "string",
          "description": "Contribution type label"
        }
      },
      "description": "CRediT contribution"
    },
    "facetDefinition": {
      "type": "object",
      "required": [
        "slug",
        "label",
        "values"
      ],
      "properties": {
        "slug": {
          "type": "string",
          "description": "Facet slug identifier"
        },
        "label": {
          "type": "string",
          "description": "Display label"
        },
        "values": {
          "type": "array",
          "items": {
            "ref": "#facetValue",
            "type": "ref"
          },
          "description": "Available values with counts"
        },
        "description": {
          "type": "string",
          "description": "Facet description"
        }
      },
      "description": "Facet definition from the knowledge graph"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 2
}
```
