RavenDB 4.1 FeaturesHighlighting

time to read 2 min | 238 words

This s actually an old feature, that didn’t make the cut to enter 4.0. This is now back, and it is roaring. This is the kind of feature that is useful if you are utilizing RavenDB’s search capabilities. Let us assume that you want to search for something, but instead of querying for “give me all the active users” you want to actually… search. For example, you want to search for all employees with a BA in their bio. However, you don’t want to just get the matches, you want to show the user why this was matches.

That is the problem that highlighting is meant to solve. Consider the following query:

image

Which returns the following results:

image

Why did we get this particular employees?  Let’s find out:

image

Now we are asking the server to highlight for us the reason for the match. You can see this in the studio directly, in the Highlight tab:

image

Using this approach, you can enrich the search result and provide nicer experience for your users.

More posts in "RavenDB 4.1 Features" series:

  1. (22 Aug 2018) MongoDB & CosmosDB Migration Wizards
  2. (04 Jul 2018) This document is included in your subscription
  3. (03 Jul 2018) Detailed query timing details
  4. (02 Jul 2018) Of course I know ya, dude
  5. (29 Jun 2018) Running RavenDB embedded
  6. (26 Jun 2018) Can you explain that choice?
  7. (20 Jun 2018) Cluster wide ACID transactions
  8. (19 Jun 2018) Explain that choice
  9. (22 May 2018) Highlighting
  10. (11 May 2018) Counting my counters
  11. (10 May 2018) JavaScript Indexes
  12. (04 May 2018) SQL Migration Wizard