For example, let's say I have the following facet:
Colors
- Red (7825)
- Orange (2343)
- Green (843)
- Blue (5412)
In my database, the colors will be a table, and each color will have a primary key and a name / value.
When indexing with Solr / Lucene in all the examples I saw, the value is indexed, not the primary key. Therefore, if I filter by red, I would get something like the following:
http://www.example.com/search?color=Red
I am wondering if it is advisable to index the primary key instead and retrieve values ββfrom the database when displaying face values? So I would instead get something like this:
http://www.example.com/search?color=1
"1" representing the primary key is red. I am wondering if I should use this approach, since the meanings of many of my aspects often change, but the primary keys remain unchanged. In addition, the index must be synchronized with the database.
Do you have more experience? Do you think this will affect performance?
Thanks in advance!
source share