: When i'm looking for words taking care of distance between them, i'm using : lucene syntax "A B"~distance... unfortunaly if A leads to A1 and A2 forms i : should split this into syntax +("A1 B"~dist "A2 B"~dist ") - this grows with : progression depending of normal forms quantity of each term. : : Can i search within distance using something like (+(A1 A2) +(B))~dist... : i heard that dismax can handle distance between words ignoring quotes - : could you advice in this?
Internally there are types of Lucene queries that can manage structure like what you are describing: SpanNearQuery being the most flexible, MultiPhraseQuery being less flexible but (in theory) faster. Neither of these are directly usable from the query parser -- but you could write your own query parser (or custom request handler) that built them up. -Hoss