Hello Chris, Thanks for the reply. I understand that a mixed-type index will work just fine. Just to bring up a topic for discussion/new features though: there seem to be downsides of not having a doctype:
- name space conflict when two doctypes are not related. In this case the developer will have to be careful with names - more difficult to maintain the index. If I want to delete all docs of a doc type, I can use deletet by query but it's always easier to wipe out the whole index directory if doctypes are kept separate but maintained by the same solr instance. I can run two separate solr instances to achieve this then this takes more memory/CPU/maintaince effort. One schema file with doctypes defined, and separate index directories would be perfect, in my opinion :) or even separate schema files :) -- Best regards, Jack Tuesday, June 5, 2007, 9:58:10 PM, you wrote: > : 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 is. > : 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? > it's really just an issue of semantics ... the schema.xml is where you > list all of the fields you need in your index, any notion of doctype is > entire artificial ... you could group all of the > fields relating to doctypeA in one section of the schema.xml, then have a > big <!-- ##...## --> line and then list the fields in doctypeB, etc... but > wat if there are fields you use in both "doctypes" ? .. how much you "mix" > them is entirely up to you. > -Hoss