lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <>
Subject Re: Match only documents which contain all query terms
Date Sat, 02 Jul 2011 18:20:48 GMT
I believe you should be able to get results ordered so that the 
documents you want will always come first, so you can truncate the 
results efficiently on the client side.

You could also try a regexp query (untested):

a b c -/~(a|b|c)/


On 7/1/2011 7:50 PM, Spyros Kapnissis wrote:
> Hello to all,
> Is it possible that I can make solr return only documents that contain all or most of
my query terms for a specific field? Or will I need some post-processing on the results?
> So, for example, if I search for (a b c), I would like the following documents returned:
> a b c
> a' c b (where a' is a stem for example)
> but not 
> x y a b c z
> Thanks,
> Spyros

View raw message