The right way is creating custom index or any other type of index from which you want to fetch the data from site objects. So in your case
1.Create new custom type index.
2.Then go to Indexed Content tab select your custom provider for smart search and choose a class in which smart search API logic written to fetch/create index objects.
3.Then you must need to rebuild your custom index.
Tips: If you including any custom table data in smart search then you must need to set checkbox checked for the specific columns as searchable and content then don't forget to rebuild your index.
Let me know if I can help you.