I did it the same way.
I think abstraction of the common element is a good idea.Photos might
have a description or uploaded date as well as the content and date of
article,but article do not have width and height,then set it null.
russx2 写道:
Hi,
Does anyone have any suggestions on the best way to index and query against
multiple content types. Let's say we have articles and a photos area of a
site.
For articles we want to store: title, content, date, author
But for photos we want to store: title, width, height, author
Can I just add a type element to each type's index and add whatever
attributes are relevant to that content? Then either search across
everything or restrict the search via type? Would results returned thus
include photos or articles specific data assigned to the index?
I hope this makes sense. Is there a better way to do the above?
Russ