search query length limit

22 views
Skip to first unread message

fooba...@gmail.com

unread,
Aug 8, 2022, 7:31:02 PM8/8/22
to Dataverse Users Community
I'm trying to send a query to the search api with a couple hundred names, and I get

{"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>"}

Is there a good way around this? It seems the search api doesn't support POST requests, and I can't find a way to make solr accept longer GET URIs.

Philip Durbin

unread,
Aug 10, 2022, 4:49:38 PM8/10/22
to dataverse...@googlegroups.com
You're right, the Dataverse Search API doesn't support POST. Maybe it should. Please feel free to create an issue about this.

The good news is that Solr itself does support POST*. For example, This works fine on my machine (searching the "name" field for "foobar"):

curl -X POST -d "{\"query\": \"name:foobar\"}" http://localhost:8983/solr/collection1/query

(In curl, "-d" does a POST automatically but above I put in the "-X POST" for clarity.)

I'm not sure what a good workaround would be. If you have access to the Solr server itself, you could query it with POST directly.

I hope this helps,

Phil


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/995799fa-5073-4fe4-880e-1607447270adn%40googlegroups.com.


--

Philip Durbin

unread,
Aug 11, 2022, 7:33:57 AM8/11/22
to dataverse...@googlegroups.com
Thanks for opening https://github.com/IQSS/dataverse/issues/8911 about this.
Reply all
Reply to author
Forward
0 new messages