As far as I understand, I can put multiple doc types in the same index, for example, web pages, images, products, etc. In order to do so, I think I need to do the following:
- have a doctype field (not necessary but nice to have) - add all possible fields of all doc types in schema - when querying for a particular doc type, make sure to either specify the doctype field, or use fields that are only available in that doc type. This is based on my understanding that solr/lucene does not have the concept of document type. It only sees fields. Is my understanding correct? It seems a bit unclean to mix fields of all document types in the same schema though. Or, is there a way to allow multiple document types in the schema, and specify what type to use when indexing and searching? -- Best regards, Jack