Hey, can you provide a complete example including indexing and mapping? In a quick test it seems to work as you expect, so there might be differences in the configuration...
--Alex On Tue, Apr 22, 2014 at 8:36 AM, Michael Sander <[email protected]>wrote: > I am running some complicated span near searches and the results do not > make much sense. > > Take the following toy example: > > {'span_near': {'clauses': [ > {'span_term': {'text': 'foo'}}, > {'span_near': {'clauses': [{'span_term': > {'text': 'biz'}}, > {'span_term': > {'text': 'buz'}}], > 'in_order': False, > 'slop': 0}}], > 'in_order': False, > 'slop': 0}} > > I would *expect* that this search would return documents where foo, biz, > and buz were directly next to each other. I would expect it to match: > > foo biz buz > > I would *not expect* it to match: > > foo biz and biz buz > > However, nested span_near queries seem to match both documents. I have a > feeling this is an issue with Lucene rather than ES, but does anyone know > whether this was done by design? It seems like an entirely > counter-intuitive result. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/88009474-4517-4ec6-a53d-ee742a5372fa%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/88009474-4517-4ec6-a53d-ee742a5372fa%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_MC8O6Qj-59019eVN4KcnO8wSbWAYtx0FvS5Ut8-362g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
