Hi everybody,
I'm not quite sure, where my mistake is at the moment and I hope you can help me. I'm trying to formulate a query using the q-Endpoint described by Jose in [1].
I have two fields and trying to find documents that contain two or more keywords in either of them. It's not important in which of the both fields a keyword is, only that all of them are in either of them.
Examples:
field1 contains keyword1
field2 contains keyword2
--> should be found.
field1 contains both keyword1 and keyword2
field2 contains neither
--> sould be found
field1 contains keyword1
field2 contains neither
--> should not be found.
For 3 keywords this would work in a similar way
field1 contains keyword1 and keyword2
field2 contains keyword3
--> should be found
I tried the following Qurey:
/q? ... &field1_OR_field2=keyword1&field1_OR_field2=keyword2
This unfortunately finds all documents that contain any of the keywords. So in the example cases it also returns the third example where only field1 contains keyword1 and keyword2 is not in the document at all.
Thank you and regards,
Steffen
[1] http://osgeo-org.1560.x6.nabble.com/Search-using-API-td5400421.html