Hi Maria, Did you read the reference guide?: https://solr.apache.org/guide/8_11/highlighting.html#schema-options-and-performance-considerations In particular, you're going to get the best performance with hl.method=unified and storeOffsetsWithPositions=true. I wouldn't bother with termPositions or termOffsets options but termVectors is great if you have wildcards in your queries; otherwise remove this too as it'll be needless bloat.
Try setting hl.fragsize=0 which can short-circuit some expensive sentence fragmentation that I suspect might not be useful if your values are only 200 characters. 2-3M values -- wow that's something. Solr has to pull all that data back per doc that's matched. Good luck, ~ David Smiley On Mon, Mar 11, 2024 at 5:53 PM Maria Muslea <maria.mus...@gmail.com> wrote: > > Hi, > > I am having trouble with highlighting being very slow. I tried all > suggestions that I could find online, but it is still much slower than I > would like it to be. > > This happens on multi-valued fields that can sometimes have ~2-3M values of > ~200 characters each value. > > I am using hl.method=unified with SOLR 8.11.3, and the highlighting can > take 10-20 seconds. > > I tried indexing all the fields that I highlight with: termVectors="true" > termPositions="true" termOffsets="true", but this didn't seem to help with > hl.method.unified or hl.method=fastVector. > > I tried hl.fragAlignRation=0.0 and also hl.snippets=1. > > Can you suggest anything else that I could try? > > I appreciate your help. > > Thank you, > Maria