Lucene 中 SpanQuery 的用途是什么? [英] What is the purpose of SpanQuery in Lucene?

查看:23
本文介绍了Lucene 中 SpanQuery 的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释一下 SpanQuery 是什么,它的典型用例是什么?

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.

推荐答案

Spans 提供了一个 邻近搜索 特性到 Lucene.它们用于查找彼此靠近的多个术语,而无需这些术语以指定的顺序出现.您可以指定要查找的术语,以及它们必须有多接近.您可以将这些跨度查询相互组合或与其他类型的 Lucene 查询组合.

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.

这篇关于Lucene 中 SpanQuery 的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆