문제

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.

도움이 되었습니까?

해결책

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top