Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Solr High Performance

You're reading from  Apache Solr High Performance

Product type Book
Published in Mar 2014
Publisher
ISBN-13 9781782164821
Pages 124 pages
Edition 1st Edition
Languages
Author (1):
Surendra Mohan Surendra Mohan
Profile icon Surendra Mohan

Sorting results by function values


Consider a situation where you have an application that stores the list of publishing houses in the index and allows users to search it. Added to the situation, you are more concerned about the publishers that are located near the point where you reside and where you are currently searching the information. In this case, you need some feature that you need to sort your search result based on the distance from a geographical point. Can Solr help you achieve this? The answer is yes, and we will demonstrate how we can achieve it in this section.

This section uses geospatial search. Thus, if you are not familiar with geospatial search, we recommend that you refer to the Geospatial Search section covered in Chapter 1, Searching Data, Administrating Solr, Packt Publishing.

Let us now start with the actual activity by adding the following index structure in the fields section of our schema.xml file:

<field name="p_id" type="string" indexed="true" stored="true...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}