lucastorri/reindxr

support for metadata files

Closed this issue · 2 comments

Given a file, reindxr should support a second one with extension .metadata. For instance:

somefile.pdf => somefile.pdf.metadata

The metadata will contain key/value entries. It will be mapped to a new document and each of those entries will be a document field and an indexed value, like

title: a title for the associated document
author: John Doe
data: 03/17/2012

A new service will be exposed, which will return the file id (somefile.pdf) of the matched document:

/metadata/#{field}/#{search criteria}

Options on how to index the data:

  • create a metadata index
    • pros: don't need to reload all the document if metadata is changed

  • add the metadata to the file document
    • pros: simplifies mixed searching (metadata plus contents)

base implementation 3acadd4