Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature Request: Extend getCollectionItems dataset search functionality

Aperta
#489 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start at the getCollectionItems use case and trace how it builds the /api/search request and transforms dataset results. Read the existing CollectionSummary and dataset metadata transformer behavior before mapping the proposed options. Done means preserving existing behavior while supporting collection results, metadata field parameters and raw-field handling, and unchanged complex filter expressions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

We'd like to propose enhancing the getCollectionItems use case to expose more of the /api/search API’s dataset search functionality while preserving the existing API behavior.

What do you think of the suggested points below? We're open to providing a PR for these changes.

Collection information

Add a showCollections option to the use case. When enabled, the /search request should include show_collections=true. Dataset results should then expose their associated collections, transformed into the existing CollectionSummary type.

Metadata fields

Add support for a metadataFields option accepting multiple field specifications in the format:

metadataBlockName:fieldName

(as defined in the Dataverse Search API documentation)

Each value should be sent as a separate metadata_fields query parameter. When metadata fields are returned, transform the metadataBlocks payload using the existing dataset metadata transformer.

Also add a keepRawFields option so callers can choose whether metadata values remain unchanged or are transformed to Markdown.

Complex filter queries

Remove the restriction that filter queries must follow a simple key:value format. Filter queries should also accept arbitrary strings, including:

  • Parentheses
  • Mixed AND and OR operators
  • Wildcards, such as abc:* or subtreePath:*/42
  • Numerical or date ranges, such as abc:[0 TO 100]
  • Already-quoted values, such as abc:"xyz"

Complex expressions should be forwarded unchanged. Simple filters can continue using the existing normalization behavior, provided query strings like the ones listed above are not incorrectly wrapped in quotes.

Since Solr syntax is broad and allows more special operators (e.g., boosting, fuzziness, regex) than what I listed above, implementing a detection function that determines whether to transform the filter query or not may be quite complex and brittle.

I think it might be cleaner to just allow the user to specify if the filter query should be passed through without transformation, either via boolean flag param or by changing the type from string[] to string | string[], allowing users to pass an already complete and "finished" query string instead of a string array of individual filters.

Lingua principale
TypeScript
Stelle
20
Fork
11
Merge medio
2g 5h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IQSS/dataverse-client-javascript

Tutte le issue di IQSS/dataverse-client-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.