6 Full-text, geo-spatial and reporting queries

 

In this chapter:

  • Understanding full-text search
  • Basic full-text search with RavenDB
  • Additional capabilities provided by full-text search
  • Reporting and ad-hoc queries
  • Geo-spatial queries

One of Google’s strengths is the quality and easiness of data retrieval. The ability to use a simple multi-word query and bring back results that are relevant is quite an art. The fact that they do this in milliseconds on unimaginable stocks of data is another amusement, but all agree Google redefined the way we think of search and data lookup by introducing this minimalistic search box close to 2 decades ago. Since then many followed, and nowadays users learned to expect a similar experience in every application or website they interact with.

Imagine you could provide such abilities to your users – just letting them type something and be able to act on that to provide them with what they were looking for. In fact, you should probably avoid at all costs not imagining that, unless you are targeting users who are not familiar with Google, Amazon, eBay and many other websites that do allow this interaction, and do that very well.

6.1   Full-text search queries

6.1.1   Enabling full-text search on a field

6.1.2   Lucene’s analysis chain

6.1.3   Customizing an Analyzer for a field

6.1.4   Results highlighting

6.1.5   Suggesting alternate spellings for search terms

6.1.6   Finding related documents using MoreLikeThis

6.2   Taking advantage of the inverted index

6.2.1   Accessing the list of terms

6.2.2   Faceted search

6.3   Reporting queries

6.3.1   Dynamic Aggregations with Facets

6.3.2   The SQL replication bundle

6.4   Geo-spatial search

6.4.1   Point and Radius Searches

6.4.2   WKT shapes

6.4.3   Spatial Relations: The 4 supported search types

6.5   Summary