Skip to content

Wrong Filter on name Space SPARQL Query #12

@DiegoPino

Description

@DiegoPino

What is this?

A few months/years/centuries ago a pull introduced this code / Sparql filter in the .module file at line 3xx

if ($namespace) {
  $condition .= 'FILTER(REGEX(STR(?object), "^info:fedora/' . $namespace . ':"))
  }

Well, that SPARQL filter is wrong and fails on the tuque side with a non very readable error.

@bondjimbond i think this one came from you at #1

A quick local correction on my code replacing $condition with a

$condition .= 'FILTER REGEX( STR(?object), "^info:fedora/' . $namespace . ':", "i") ';

Seems to do the trick, but then i need to check if the last ; actually works in all the having/not having some filters mix situations.
UPDATE (see i removed the ;) : its actually not the filter itself. I had some guesses about the ; used to concatenate each filter. So depending on what filter is selected the SPARQL ends malformed. Right now if you use namespace and date filtering all goes to hell.

Does this filter work on your side Brandon? Answer should be yes, but only when no date filtering.

I will make a pull in a little while.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions