Feature Request: Extend getCollectionItems dataset search functionality
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 20
- Forks
- 11
- Merge médio
- 2d 5h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de IQSS/dataverse-client-javascript
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
IQSS/dataverse-client-javascript#477 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
IQSS/dataverse-client-javascript#476 · 4 comentários ·
-
Missing dependency `p-limit`Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
IQSS/dataverse-client-javascript#465 · 1 comentário · 2 reações ·
-
GREI Re-arch
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
Todas as issues de IQSS/dataverse-client-javascript
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
openedx/frontend-app-authoring#3274 ·
Mantenedores costumam responder em até 1 dia
-
🎙️ task - fix(deployer): deploy --env prep runs deploy:dev where the repo declares deploy:prepAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
area/documentation status/need-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
google-gemini/gemini-cli#29548 ·
Mantenedores costumam responder em até 1 dia
-
sdk-typescript vector-store
Dificuldade 2/5 Meio dia Facilidade para iniciantes 82/100
mem0ai/mem0#7495 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia