Reputation: 67
In solr, i am searching simultaneously in database, xml files, pdfs etc. so the solr search response have different fields for each search result record (for each document or database record).
Here how can i write the common response parser to parse the different fields(ie My PDF have different fields , database tables have different fields)
Upvotes: 0
Views: 421
Reputation: 5000
The common way to doing this is to try to have one uniform datamodel. Try to first identity what you want to show your users. For example if you run a library you might have fields such as:
Then try to map all your datasources to populate these fields. Either you map this datamodel in your “connectors” (custom code extracting the data) or you to look at copy fields for doing this. See link:
Upvotes: 2