project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Find similar objects based on a given object's works (from 656) #17

Open gigamorph opened 4 months ago

gigamorph commented 4 months ago

Objects are interesting in terms of similarity.

But the similarity should also take into account similarity of the carried/shown work(s).

To wit, a book about a Torosaurus and a poster about a Torosaurus are (I would say) more similar than a book about a Torosaurus and a book about particle physics. However the materiality (e.g. the properties of the object) is clearly the same -- they're both books.

To generate such a query we would need to retrieve the works and process them. Which for objects that carry many works could be a challenge if we want to limit the clauses in the query for performance reasons. E.g. we can't just do

OR(
  similar(work-id1),
  similar(work-id2),
  similar(work-idn)
)

in the object's similar() query as n might be high, and the cost of the embedded similar()s might also be high.