Book Image

Solr Cookbook - Third Edition

By : Rafal Kuc
Book Image

Solr Cookbook - Third Edition

By: Rafal Kuc

Overview of this book

Table of Contents (18 chapters)
Solr Cookbook Third Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using boosting with autocomplete


Autocomplete is very good when it comes to our user search experience. It is especially useful for showing users' data that we want to promote or the data that is of value to the users. In general, in e-commerce, the deployment of the autocomplete functionality means more profit. However, there are situations where we want to promote certain products or documents, for example, the currently top-selling books or financial reports, which are the most important ones. This recipe will show you how to boost certain documents when using the n-gram-based autocomplete functionality.

How to do it...

Let's perform the following steps to boost certain documents using the n-gram-based autocomplete function:

  1. We start with creating the index structure for our use case; we just put the following section to the schema.xml file:

    <field name="id" type="string" indexed="true" stored="true" required="true"/>
    <field name="title" type="text_general" indexed="true" stored...