well if you intend to build a custom searchable index then chatgpt api will be very useful

  1. user adds text or uploads pdf
  2. ocr reads pdf/uploads and extracts text
  3. chatgpt then summarizes text, extracts keywords and name and creates an index item
  4. user searches index items and relevant index items are returned, user opens each item to see the detail

algolia is a great search tool and will give you lightning fast results that can also be fuzzy/loosely relevant to the content

by splitting the data in 2 - index and detail - you essentially create a very lightweight searchable index that then links to the relevant detail items