JSON Request API and request handlers defaults

2021-08-16 Thread Andrew Hankinson
ot;, "params": {"fl": ["field4", "field5", "field6"]} } In this case I see fields 4, 5, and 6 in the result, but this means that I cannot use the "fields" parameter in the JSON Request API. I have also tried changing the request handler to: field1 field2 field3 but this does not work. Is this a known bug? Many thanks, -Andrew Hankinson

Re: Random Field - # digits

2021-08-31 Thread Andrew Hankinson
You could use the UUIDUpdateProcessorFactory to automatically add a UUID to each document and use that as the tie-breaker field. https://solr.apache.org/guide/8_1/update-request-processors.html#uuidupdateprocessorfactory The chances of collision of UUIDs is well-known, and highly unlikely. http

JSON Query API "fields" does not work

2022-01-07 Thread Andrew Hankinson
Hello, I am using the JSON Query API, and the 'fields' key does not work as expected. Using the following query with the `post` tool: $> echo '{"query":"*:*", "fields": ["id"]}' | ./post -url http://localhost:8983/solr/mycore/select -type application/json -out yes -d I get the full document ba

Re: JSON Query API "fields" does not work

2022-01-07 Thread Andrew Hankinson
ndrew > On 7 Jan 2022, at 12:55, Mikhail Khludnev wrote: > > Hello, Andrew. > > Could you try to pass a string value for "fields" property? That's what I > see in TestJsonRequest. > > On Fri, Jan 7, 2022 at 1:03 PM Andrew Hankinson > wrote: > >&

Re: JSON Query API "fields" does not work

2022-01-07 Thread Andrew Hankinson
ust the `id` and `type` fields. I'm on 8.11.1 > On 7 Jan 2022, at 12:55, Mikhail Khludnev wrote: > > Hello, Andrew. > > Could you try to pass a string value for "fields" property? That's what I > see in TestJsonRequest. > > On Fri, Jan 7, 2022

Re: Customize sort-behaviour on solr.StrField for German language

2022-02-01 Thread Andrew Hankinson
You can use the ICU Collation Field instead of string: This sorts numbers and letters correctly, as well as does Unicode folding, so 1,2,3...10...20, instead of 1,10...2,20...,3, and folds the characters so that ä,á, etc. are sorted as "a". https://solr.apache.org/guide/8_11/language-anal

Re: Is there a way to sort alphanumerically?

2022-11-10 Thread Andrew Hankinson
I use this field definition for a sort field: This seems to work well. -Andrew > On 10 Nov 2022, at 11:06, Netta Steinberg wrote: > > Hi all, > > I want to sort value alphabetically, but also numerically. > Example: > I want that the following items > A1 > B4 > A2 > A19 > B10 > > Will be s

JSON formatting in 9.3.0 query UI

2023-08-09 Thread Andrew Hankinson
Hi everyone, I've looked through the Jira boards but I couldn't see any mention of this as an issue. Since upgrading to Solr 9.3.0, my JSON query results in the built-in query UI seem to be lacking indents, so that everything is left-aligned. I've tried different browsers, and have cleared ca

Invalid JSON response with UUID field

2023-11-30 Thread Andrew Hankinson
Hi, I have a schema with a UUID field type configured as a unique key. I recently upgraded my Solr installation to 9.3 (from 7.6) and my application stopped working. It turns out that Solr has stopped encoding UUIDs as strings in the JSON response writer. Whereas before I would get: "id"

Re: Invalid JSON response with UUID field

2023-11-30 Thread Andrew Hankinson
s it "SolrCloud"? is it /get or /select > ? etc. > >> On Fri, Dec 1, 2023 at 12:05 AM Andrew Hankinson >> wrote: >> >> Hi, >> >> I have a schema with a UUID field type configured as a unique key. >> >> > multiValued=&

Error message in multiThreaded=true

2024-09-11 Thread Andrew Hankinson
Hi everyone, I just installed 9.7.0 and thought I would try the new multiThreaded search. When I do, running my 'normal' queries but with the `multiThreaded=true` parameter set, this error appears in the logs: 2024-09-10 16:19:45.060 ERROR (qtp1756573246-62-null-37) [c: s: r: x:core-name t:nu

Re: Problem with POST in python code

2024-12-17 Thread Andrew Hankinson
You're not actually POSTing the data. The requests module is a lot easier than using the urllib module. https://requests.readthedocs.io/en/latest/ r = requests.post('http://localhost:8983/solr/films/query', data={"query":"*:*"}) print(r.json()) This should set all the appropriate headers as w