eluv-io / elv-fabric-browser

Eluvio Content Fabric Browser
MIT License
2 stars 1 forks source link

Add searchables section for titles and title collections #91

Closed elv-serban closed 1 year ago

elv-serban commented 1 year ago

The site-level 'searchables' feature uses links to its title or title collections objects 'searchables' section.

We need to enhance the asset manager for title and title collections to create one or all 'searchables' links.

Ideally just present a section called 'searchables' and allow to user to select one or more of the supported categories.

Our current convention uses the following searchables categories:

  1. asset_metadata - this is the most common and is a link to /public/asset_metadta
  2. offerings - this is the second most common and is a link to /offerings (not under /public)
  3. assets - link to /assets
  4. video_tags - link to /video_tags

Example full searchables section:

  "searchables": {
    "asset_metadata": {
      ".": {
        "auto_update": {
          "tag": "latest"
        },
      },
      "/": "./meta/public/asset_metadata"
    },
    "assets": {
      ".": {
        "auto_update": {
          "tag": "latest"
        },
      },
      "/": "./meta/assets"
    },
    "offerings": {
      ".": {
        "auto_update": {
          "tag": "latest"
        },
      },
      "/": "./meta/offerings"
    },
    "video_tags": {
      ".": {
        "auto_update": {
          "tag": "latest"
        },
      },
      "/": "./meta/video_tags"
    }
  }

Configuration

We could use the content type JSON schema to determine the searchables categories to show:

For example for a Title:

And for the Title Collection just use asset_metadata and assets (because offerings and video_tags don't pertain)

elv-serban commented 1 year ago

Design Notes:

(discussion 2023-05-17)

Content Type Configuration:

Info Fields Searchable paths:

Management App

Info Tab
    Searchable paths:
           - [ ]  asset_metadata   
           - [ ]  offerings
elv-victor-amigo commented 1 year ago

I ingested 5 different titles and then added a brief synopsis to each of them (lorem ipsum) as well as merged the searchables metadata as stated in the above comment. Been using the nobleflash demo tenancy. https://share.1password.com/s#X0V4bpTH_dt9gNEQgTsbNzlklkMihYZcSswuS8fFs9c

Then, I created a Search index object (iq__3Ryg5eotzgAEFL1tuxkwD8hBXbx3) with content type Title Collection where I added the Searchables tab using the gear icon and saving the content type's spec. Finally, I added all five recently ingested titles inside the Searchables section with no issues. I did the same with the Site object (iq__t5JiDQW2W2tyHUyLaAbwrtkENc6) but also added all titles inside the Titles tab as well.

After saving all my changes, I now see site_map containing all titles with searchables pointing to their latest versions hashes. Not sure how to proceed from here or how to link the site object with the newly created search index.

elv-victor-amigo commented 1 year ago

I've also changed the spec of both Title and Title Collection content types so that Searchable Links flag is checked and necessary links are added:

elv-victor-amigo commented 1 year ago

Following up, I created a Site (iq__2Cyy77DqNbw8m1XfBLX2JeDx8iFZ) and Search Index (iq__3mUrGK5J3u6cD6KZAwx1ksdvHxyJ) content types inside the nobleflash tenancy. I then added all searchables titles I had previously set up inside the Searchables section of the Site object.

Screen Shot 2023-05-30 at 1 23 38 PM

Then, I added the site object inside of the Search Index object, provided a document prefix so that it points to the entire object and added the necessary paths and types so that the index could query title and synopsis (on each video asset, I added a brief lorem ipsum synposis).

Screen Shot 2023-05-30 at 1 24 59 PM

Lastly, I updated the indexer and tested by running a query searching for a specific title string and text part of synopsis of the searchable objects. Worked without errors.

Screen Shot 2023-05-30 at 1 28 21 PM

elv-zenia commented 1 year ago

Deployed to prod.