Question

With Solr I can sort results by field and start at a particular result number; however, I would like to start at a particular field value instead (or in addition to). For example, I have a library of books that I want to sort by title and start at the H's. In SQL it would look something like this:

SELECT *
FROM Books
WHERE title >= 'H'
ORDER BY title
LIMIT 10

Can this be done in Solr? I want to be able to do this in Solr and not a separate database because I already use Solr for my search engine and I want to take advantage of features like facets.

I'm using Solr 4.7.0, but I am able to upgrade to newer versions.

Was it helpful?

Solution

Did you try filter query with range title:[H* to Z*]?

Let me know if you need more info or exact query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top