Feature Request: Extend getCollectionItems dataset search functionality
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 20
- Forks
- 11
- Ø Merge
- 2 T. 5 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus IQSS/dataverse-client-javascript
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IQSS/dataverse-client-javascript#477 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
IQSS/dataverse-client-javascript#476 · 4 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
IQSS/dataverse-client-javascript#465 · 1 Kommentar · 2 Reaktionen ·
-
GREI Re-arch
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 66/100
Alle Issues in IQSS/dataverse-client-javascript
Ähnliche Issues
-
priority: P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
prime-radiant-inc/evener#3291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug revealjs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
quarto-dev/quarto-cli#14961 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
supabase/agent-skills#614 ·
-
Content
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
RunestoneInteractive/rs#1559 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen