Reputation: 8227
I'm trying to search for results within a range e.g. A TO C. However the results are coming in with results that contain letters within the range but I only want results that START with letters within the range.
Upvotes: 0
Views: 2441
Reputation: 8227
I ended up using frange provided by the QParser plugin available for solr 1.4
{!frange l=A u=C}fieldname
I got the info from here
Upvotes: 0
Reputation: 12883
Easiest way -- During index time, create another field that contains only the first letter. So if the field currently contains:
Alpha
Beta
Charlie
then index this in a separate field (non-analyzed):
A
B
C
Then use range query as usual
myFieldFirstLetter:[A TO C]
Upvotes: 1