RegExp search


#1

How can I search subjects and objects using “partial matching” or a regular expression? For example

  • search subjects that contain the namespace “.schema.
  • search subjects that have predicate equal to https://schema.org/name and object like “.mountain.

#2

Let me try to have my first answer here :slight_smile:

As for the first question: if all those subjects are related to ‘a schema’? I believe you should make a new relationship for that more generic subject. From what I understand, that is the idea of a graph database.

As for the second one: I believe it is better to use a different database for that. Maybe something like Elasticsearch.

I have to say: I’m really new to Cayley and maybe there are ways to do this. Hope other maintainers will jump in if I’m not correct…


#3

As a sidenote, Cayley support for Elasticsearch is in the pipeline. There is a pull request on the way - #634