tutorials/doc-search/metadata.md
<callout>PageIndex with metadata support is in closed beta. Fill out this form to request early access to this feature.</callout>
For documents that can be easily distinguished by metadata, we recommend using metadata to search the documents. This method is ideal for the following document types:
In such cases, you can search documents by leveraging their metadata. A popular method is to use "Query to SQL" for document retrieval.
Upload all documents into PageIndex to get their doc_id.
Store documents along with their metadata and the PageIndex doc_id in a database table.
Use an LLM to transform a userβs retrieval request into a SQL query to fetch relevant documents.
Use the PageIndex doc_id of the retrieved documents to perform further retrieval via the PageIndex retrieval API.
Contact us if you need any advice on conducting document searches for your use case.