I have an index of about 50m documents. the fields in this index are
basically hierarchical tokens: token1, token2.... token10
When searching the index, I start by getting a list of the query tokens
(1..10) and then requesting the documents that suit those query tokens.
I always want about 1000 results back, therefore I don't query for all
search tokens. My solution right now is to check with rows=0 what tokens
combination gives me 1000 results +/- 200, and then fetching them. But this
means up to 10 queries to Solr. So I query with token1:x, then with
token1:x AND token2:y, then with token1:x AND token2:y AND token3:z....
I have 3 questions on this regard:
1. when searching token1:x and token2:y, solr actually intersects millions
of documents. Will it work faster if I query token12:xy?
2. for the last 1000 results I run them through a function query, does
function query works similarly to custom scoring? which one is faster?
3. is there a better solution for my problem?