Sometimes, you’ve got to make a trade: a bit less speed for a lot less disk space.
Here’s how you can shrink your Solr index like a pro (and keep your server from bursting at the seams):
int
instead of tint
int
field takes up less space than a trie integer (tint
).int
will be slower than tint
. (It’s a classic “pick two out of three” scenario: fast, small, cheap.)Take a hard look at your fields.
Sometimes, to get a slimmer index, you need to be ruthless.
Are you hoarding stored fields?
If you’ve got lots of stored fields, try this power move:
Add omitNorms="true"
On text fields that don’t need length normalization.
(Translation: If you don’t care about short/long document bias, ditch the norms and reclaim space!)
Add omitPositions="true"
On text fields that don’t require phrase matching.
(You lose phrase search on those fields, but win back precious bytes.)
Beware the NGram monster!
Special fields like NGrams can gobble up a ton of space.
Shrink smart, and may your search be speedy and your indexes svelte! 🚀🗜️