See the Lucene query parser syntax documentation:
http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Proximity%20Searches
basically... "shell petroleum"~10 should do the trick (if you're using
a standard request handler, can't remember if dismax supports
proximity).
On 18 Aug 2009, at 13:28, Ninad Raut wrote:
Hi,
I want to count the words between two significant words like "shell"
and
"petroleum". Or want to write a query to find all the documents
where the
content has "shell" and "petroleum" in close proximity of less than
10 words
between them.
Can such quries be created in Solr?
Regards,
Ninad Raut.
--
Toby Cole
Software Engineer, Semantico Limited
<toby.c...@semantico.com> <tel:+44 1273 358 238>
Registered in England and Wales no. 03841410, VAT no. GB-744614334.
Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.
Check out all our latest news and thinking on the Discovery blog
http://blogs.semantico.com/discovery-blog/