How to store the file path of an indexed document in Apache Solr 5.1.0

203 Views Asked by At

I'm trying to store the file path of an locally stored indexed document in Apache Solr so I can then update the index with metadata that is stored in a DB in MySQL. That file path is how I'm going to relate the document to its corresponding metadata

I already have the filepath in the DB, I just need a way to store it when I index the documents. How can I store a documents file path in Solr?

1

There are 1 best solutions below

0
On BEST ANSWER

You just need to add this information on a field documentPath for exemple and query the information on indexing. If you're using DataImportHandler just return the information on query and index it in the new field. Create the documentPath with string type for exemple.