Skip to content

Two filters in one query & nested queries #3205

Discussion options

You must be logged in to vote

I am actually not entirely sure how you can create more than one filter clause in the same group graph pattern. It should be possible, but it looks as if the SparqlBuilder simply assumes that there will alway only one filter clause. I'm either overlooking something, or this is a bug (or at least a shortcoming).

A workaround is just to put your constraints in the single filter clause:

.filter(Expressions.and(endDateGreaterThan, startDateLessThan, Expressions.equals(otherPrice, price))));

Doesn't give you exact result you're after, but the meaning of the query is the same.

As for your second question, assuming that what you're struggling with is getting the subselect to work, have a look at…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@vaishali-legislate
Comment options

@abrokenjester
Comment options

@vaishali-legislate
Comment options

Answer selected by vaishali-legislate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants