Feature Request: Extend getCollectionItems dataset search functionality
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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:*orsubtreePath:*/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.
- Langage dominant
- TypeScript
- Étoiles
- 20
- Forks
- 11
- Merge moyen
- 2 j 5 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de IQSS/dataverse-client-javascript
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
IQSS/dataverse-client-javascript#477 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
IQSS/dataverse-client-javascript#476 · 4 commentaires ·
-
Missing dependency `p-limit`Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
IQSS/dataverse-client-javascript#465 · 1 commentaire · 2 réactions ·
-
GREI Re-arch
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 66/100
Toutes les issues de IQSS/dataverse-client-javascript
Issues similaires
-
refactor
Difficulté 2/5 Une demi-journée Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
OHDSI/Data2Evidence#3450 ·
Les mainteneurs répondent en général sous 2 jours
-
e2e-failure ready-to-code
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
automation missing-model model-sync provider:ofox
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
anomalyco/models.dev#8421 ·
Les mainteneurs répondent en général sous 1 jour
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour