Custom Smart Search Index

Zachary Perry asked on November 18, 2016 19:13

Creating a custom search index for a custom module. There are multiple classes I am going to pull content from for the index, what would be better:

  1. Create multiple search indexes, one for each class
  2. Create one search index, for all of the data

Just curious if there would be a reason one way or the other.

Correct Answer

Brenden Kehren answered on November 18, 2016 19:57

Both are the right answer!

If you choose to have more granular searching abilities, then I'd say one for each class. If you choose to have generic data across them all then use one for all data. Either way, I'd modularize your code quite a bit so you can reuse it if you decide to go one for each class!

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.