Complex query on search end point

19 views
Skip to first unread message

Christoforos Korifidis

unread,
Jun 14, 2023, 5:08:37 AM6/14/23
to DSpace Community

Hello I wan to run a query on the search end point

/api/discover/search/objects

When I query on a custom field lets say:
local.formatExtent.orientation:test
I get correct results.

When I query on second custom field lets say:
local.formatExtent.width:test2
I also get correct results.

No when I combined the two
local.formatExtent.orientation:test&local.formatExtent.width:test2

I get no result, obviously because this is not correct syntax.
Does any one can help me on how to issue a query on 2 metadata fields?

Christoforos Korifidis

unread,
Jun 14, 2023, 5:51:30 AM6/14/23
to DSpace Community
Hello again I finaly solved it my self by reading the docs very very carefully.

So for everybody hoving the same issue the key phrase in the docs is that you have to use solr lucent query rules.
So the right way is to write the query like this

?dsoType=item&query=local.field1:test1 and local.field2:test2
of course the value of the query parameter (local.field1:test1 and local.field2:test2) must be url encoded.

με εκτίμηση
Χριστόφορος Κορυφίδης

κιν./mob. : +30 6932606269
Διεύθυνση: Κώτσου 9, 34100 Χαλκίδα.
Address   : Kotsou 9,  34100 Chalkida Greece.



--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-community/-dTkHtxhU_k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/9ec9b5d9-a006-4442-ab5c-bb5d4df49143n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages