Next, we’ll look at how the Completion Suggester works, then move on to the Context Suggester, which is an extension of it, much like the phrase suggester we discussed earlier is an extension of the simpler term suggester.įor versions 2.0 and later, a new Completion Suggester is planned. The actual implementation is a bit more complex-because it allows you to add weights, for instance- but you can imagine why in-memory FSTs are fast: you just have to follow the paths and see that prefix s would lead to search and suggest. In-memory FSTs help you get fast suggestions based on a prefix. Figure F.6 illustrates how the terms index, search, and suggest would be stored.įigure F.6. FSTs are essentially graphs that are able to store terms in a way that’s compressed and easy to retrieve. They’re built on Lucene’s Suggest module, keeping data in memory in finite state transducers (FSTs). The completion and context suggesters help you build a faster autocomplete. But those queries might not be fast enough because ideally you need to come up with a suggestion before the user types the next character. You could then run the prefix queries we introduced in chapter 4 to generate suggestions. You can help with the quality of suggestions by keeping what would be good candidates, such as successful products or queries, in a separate index. Finally, a good autocomplete will reduce the load on your main search system, especially if you have some sort of instant search available-when you jump directly to a popular result without executing the full-blown search.Ī good autocomplete has to be fast and relevant: fast because it has to generate suggestions as the user is typing, and relevant because you don’t want to suggest a query with no results or one that isn’t likely to be useful. (“elasticsearch tutorial”-that’s actually a good idea!). You expect a good autocomplete to help you search faster (especially on mobile devices) and better (you type in e, so it should know you’re looking for Elasticsearch) but also to allow you to explore popular options If autocomplete was cool in 2005, now it’s a must-any search without it looks ancient. Using suggesters for autocomplete and did-you-mean functionality Turning search upside down with the percolatorĪppendix F. Kopf: snapshots, warmers, and percolatorsĪppendix E. ElasticHQ: monitoring with managementĭ.4. Telling Elasticsearch to require certain pluginsĪppendix D. Filter and aggregate based on distanceī.4. Adding distance to your sort criteriaĪ.3. Optimizing the handling of Lucene segmentsĪ.2. Discovering other Elasticsearch nodesġ0.2. Adding nodes to your Elasticsearch clusterĩ.2. Denormalizing: using redundant data connectionsĩ.1. Parent-child relationships: connecting separate documentsĨ.5. Nested type: connecting nested documentsĨ.4. Overview of options for defining relationships among documentsĨ.3. Understanding the anatomy of an aggregationĨ.1. Exploring your data with aggregationsħ.1. Reducing scoring impact with query rescoringĬhapter 7. Understanding how a document was scored with explainĦ.5. Querying for field existence with filtersĦ.4. Combining queries or compound queriesĤ.5. Core types for defining your own fields in documentsĤ.2. Using mappings to define kinds of documentsģ.2. Indexing, updating, and deleting dataģ.1. Understanding the physical layout: nodes and shardsĬhapter 3. Understanding the logical layout: documents, types, and indicesĢ.2. Exploring typical Elasticsearch use casesĢ.1. Solving search problems with Elasticsearchġ.2. Radu Gheorghe, Matthew Lee Hinman, and Roy Russoġ.1.
0 Comments
Leave a Reply. |