I need to get a list of customer with their address propore address.
After reading this post How to join two index of thiago, I think it's maybe better to create one index
customer and add the addresses inside customer. Something like this:
The question is "what for?" Why do you think you need this?
Basically I'd recommend to ask yourself 2 questions:
What kind of objects my users want to get back as a response? If it's object X, then just index object X
What typical attributes my users want to search for? Let say I need attribute a, b and c, just index those attributes within object X whatever the original source of those attributes is.
I want to create two indexes to get a better separation between customers and addresses. But I think it's coming from my sql background. Indexes are not tables, so I don't really get a benefit to separate customers and addresses. What I want is to search customers and get theire addresses, so I think It's maybe better to stick with this solution:
Yes. That's the thing I learned when I discovered search engines in the past. Forget all what your learned and don't think technically first but use case first.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.