-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO added task about indexing deep objects using lifti
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9870b12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikegoatly You can use LIFTI to search the subtitles and other metadata of YouTube videos now - thanks also to you for being so responsive :)
I was wondering whether you have any ideas about how best to index object graphs and could have a brief look at my implementation. Can this be done more elegantly without encoding composite IDs like you see me do above? Thanks!
9870b12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@h0lg would it make sense to treat the nested chunks of data as some sort of dynamic field associated to the parent object? It seems to me that what you want is something like this:
That way a property in the nested object can be used as the field name (or derived from it to have some sort of differentiation from other fields, e.g.
$"Language_{ct.LanguageName}"
)I'm not sure of the method name, but does that make sense?
9870b12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking this in issue #66
9870b12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikegoatly Thanks for the response -. I'll have a look at mikegoatly/lifti#66 !
Yeah, that API looks like it would be sufficient for what I'm trying to do. As far as I understand, your approach is to flatten selected properties of nested objects or collections into the owner as named fields instead of creating a builder for the entire nested object.
I hadn't thought of writing field-specific queries for a specific item of a nested collection. But yeah, LGTM.
My only doubt is whether other users would want to map more properties than one on a nested object or collection. At that point a separate builder would start making sense - to avoid having to repeat the same navigation properties over and over again for each mapped nested property. But that's not a real requirement for me at the moment and I can understand if you don't want to design for it and would rather keep it simple.