Can one do a proximity search with root expanders and phrases?

Hi all,

I'm just starting out on a new project, and I'm trying to decide whether
we'll use ElasticSearch for the first time or not. (I really want to!)

One problem is that my users (legal professionals) demand very specific
types of search queries. One type is the ability to do very particular
types of proximity searches (i.e., phrase A is within n words of phrase B)
and to have root expanders .

Imagine a document that contained the following sentence:
"The Fourth Amendment damages were mitigated because the police officers
conducted the warrantless search when no one was home."

A user may search for:

  • mitig* (mitigated, mitigate, mitigates, etc...)
  • within 5 words of the phrase "Fourth Amendment damages"
  • and all that within 20 words of "warrant* search" ("warrantless
    search", "warranted search", "warrant search", etc.).

This probably isn't valid syntax, but something like:
((mitig* "Fourth Amendment damages")~5 "warrant* search")~20

For what it's worth, in at least one other search engine (that I'm trying
to avoid), dtSearch, the syntax would be:
(mitig* w/5 "Fourth Amendment damages") w/20 "warrant* search"

Looking forward to hearing if this is possible and hopefully joining the ES


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit