hbz / lobid

Linking Open Bibliographic Data
https://lobid.org/
Eclipse Public License 2.0
15 stars 4 forks source link

Optional boolean operator for multi value queries #316

Closed fsteeg closed 7 years ago

fsteeg commented 7 years ago

Will partially resolve https://github.com/hbz/nwbib/issues/336. See also https://github.com/hbz/nwbib/issues/341.

dr0i commented 7 years ago

Why is there no staging deployed? Does this affect our API example 'http://lobid.org/resource?author=118580604&owner=DE-5,DE-6' ?

dr0i commented 7 years ago

The title indicates already a answer to my question:"Change multi value query behavior to AND, except for type and owner". Howerver, it's an API break, yes? (If it's possible to OR subject queries I would nonetheless maybe give an ACK).

dr0i commented 7 years ago

(will further discuss in https://github.com/hbz/nwbib/issues/336 )

fsteeg commented 7 years ago

Yes, it changes the behavior, but only for undocumented cases. The only documented case is the owner param, which remains unchanged. I also discussed this behavior change with @acka47 last week.

dr0i commented 7 years ago

Is it technically necessary to break the structural consistence between query parameters? Or could we just stay with the old behaviour plus having the new functionality?

fsteeg commented 7 years ago

Oh, and I forgot to mention the staging deployment:

http://test.lobid.org/resource?subject=http://d-nb.info/gnd/4122777-3,http://d-nb.info/gnd/4114364-4 http://test.lobid.org/resource?author=118580604&owner=DE-5,DE-6

fsteeg commented 7 years ago

And yes, you're right about consistency and not breaking the old behavior. I will try a different solution.

fsteeg commented 7 years ago

Deployed new implementation to staging. Multi-value queries now support an optional boolean operator (AND or OR) as the last value. Default is OR, so queries without an operator retain the old behavior.

See:

http://test.lobid.org/resource?subject=http://d-nb.info/gnd/4122777-3,http://d-nb.info/gnd/4114364-4 http://test.lobid.org/resource?author=118580604&owner=DE-5,DE-6

http://test.lobid.org/resource?subject=http://d-nb.info/gnd/4122777-3,http://d-nb.info/gnd/4114364-4,AND http://test.lobid.org/resource?author=118580604&owner=DE-5,DE-6,AND

dr0i commented 7 years ago

+1