Feature Request: Extend getCollectionItems dataset search functionality
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- TypeScript
- 星號
- 20
- 分支
- 11
- 平均合併
- 2 天 5 小時
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
IQSS/dataverse-client-javascript 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
IQSS/dataverse-client-javascript#477 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
IQSS/dataverse-client-javascript#476 · 4 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
IQSS/dataverse-client-javascript#465 · 1 則留言 · 2 個 reaction ·
-
GREI Re-arch
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 4/5 3-5 天 新手友好度 66/100
查看 IQSS/dataverse-client-javascript 的全部 Issue
相似的 Issue
-
area/frontend good first issue kind/cooldown
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 85/100
voidzero-dev/oxc-angular-compiler#511 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
langchain-ai/deepagentsjs#898 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 92/100
anomalyco/models.dev#8509 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug documentation P2 UI/UX
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆