Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of SpanQuery in Lucene?

Tags:

Can someone explain what a SpanQuery is, and what are typical use cases for it?

The documentation is very laconic, and keeps mentioning the concept of "span", which I'm not quite sure I get.

like image 386
itsadok Avatar asked Apr 13 '09 16:04

itsadok


1 Answers

Spans provide a proximity search feature to Lucene. They are used to find multiple terms near each other, without requiring the terms to appear in a specified order. You can specify the terms that you want to find, and how close they must be. You can combine these span queries with each other or with other types of Lucene queries.

like image 110
erickson Avatar answered Feb 08 '23 02:02

erickson