IQSS / IQSS/dataverse

Feature Request: Support POST when using Search API to enable longer queries

Open
#8,911 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: API Feature: Search/Browse Hackathon: More APIs Type: Feature User Role: API User
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Overview of the Feature Request
Currently, the Search API only supports GET requests. If you try to run a search with more than ~1500 characters, the reply is {"status":"ERROR","message":"Search Syntax Error: Error from server at http://localhost:8983/solr/collection1: Expected mime type application/octet-stream but got text/html. <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>"} . In order to support longer search queries, Dataverse Search API should accept POST requests.

What kind of user is the feature intended for?
API User

What inspired the request?
Within my institution, a user wanted to create a search that looked for records by several hundred different people. We found that we could only search for about 35 people at a time before hitting the URI length limit. I asked about this on dataverse-community here and @pdurbin suggested I file an issue..

What existing behavior do you want changed?
Search API should accept POST requests in addition to GET requets

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Search API entry point and the tests covering its current GET behavior. Reproduce a query exceeding the URI length limit, then verify that equivalent POST requests are accepted for longer queries while existing GET requests continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.