Reputation: 35
The index contains books, each book has its author, author has country. I need to search books from some country. Is it good to simply store country id in book info, or it's better to store country id only in authors info and do join?
Upvotes: 1
Views: 43
Reputation: 727
I would suggest you index books,author, country in same index, so your record will look like as:
ID,BOOKNAME,AUTHOR,COUNTRY
1,SOLR,JAYESH,INDIA
2,NUTCH,BHOYAR,INDIA
3,APACHE,USER,US
Now if you search on COUNTRY=INDIA;
it will give you books(SOLR,NUTCH)
Hope this is the answer you were looking for....
Regards,
Upvotes: 2