lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Sturlese <>
Subject Optimizing a query to sort results alphabetically for a determinated field
Date Mon, 24 Aug 2009 09:58:56 GMT

Hey there, I need to sort my query results alphabetically for a determinated
field called "town". This field is analyzed with a KeywordAnalyzer and isn't
multiValued. Add that some docs doesn't doesn'h have this field.
Doing just:


Will give me back the results sorted alphabetically but will put the docs
that doesn't have this field (town) at the begining.
I want them at the end or I want them not to apear. This query solves the

asc&fq=town:[a TO z]

But applying this filter: fq=town:[a TO z] is definitely not good in terms
of memory, speed and clauses...
Is there any way to do something similar but with a more optimized query?
Thanks in advance!

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message