vitrivr / vitrivr-engine

vitrivr's next-generation retrieval engine. It is capable of extracting and retrieving a wider range of multimedia objects such as audio, video, images or 3d models.
https://vitrivr.org
MIT License
6 stars 3 forks source link

Boolean Retrieval on Subfields #50

Closed sauterl closed 7 months ago

sauterl commented 7 months ago

This PR adds support for boolean retrieval on struct sub-fields (i.e. columns). The query caller has to know the name of the field and sub-field (also known as attribute).

Example usage: Given the FileSourceMetadataDescriptor is a StructDescriptor with two sub-fields: path and size, queries such as

{
  "inputs":{
    "booleanFileSize": {
      "type":"NUMERIC", 
      "value":"15000", 
      "comparison":">"
    }
  },
  "operations":{
    "out":{"type":"RETRIEVER","field":"file.size","input":"booleanFileSize"}
  },
  "output":"out"
}

Enable to query for retrievables with a file size greater than 15000 (bytes). The comparison is always that the sub-field is the left-hand operand and the value present in the query is the right-hand operand. Note the DOT in the retriever's field name.