SlopQueryNode

A SlopQueryNode represents phrase query with a slop.

From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".

Constructors

Link copied to clipboard
constructor(query: QueryNode, value: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var field: CharSequence?

Returns the field associated to the node and every node under it.

Link copied to clipboard
override val isLeaf: Boolean

verify if a node is a Leaf node

Link copied to clipboard
override val parent: QueryNode?
Link copied to clipboard
override val tagMap: Map<String, Any>

Returns a map containing all tags attached to this query node.

Link copied to clipboard
val value: Int

Functions

Link copied to clipboard
override fun add(children: List<QueryNode>)
override fun add(child: QueryNode)
Link copied to clipboard
open override fun clone(): QueryNode
Link copied to clipboard
open override fun cloneTree(): QueryNode

Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Link copied to clipboard
open override fun containsTag(tagName: String): Boolean

verify if a node contains a tag

Link copied to clipboard
open override fun getTag(tagName: String): Any?

Returns object stored under that tag name

Link copied to clipboard
open override fun removeChildren(childNode: QueryNode)

Remove a child node

Link copied to clipboard
open override fun removeFromParent()

Removes this query node from its parent.

Link copied to clipboard
override fun set(children: List<QueryNode>)
Link copied to clipboard
open override fun setTag(tagName: String, value: Any)

Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.

Link copied to clipboard
open override fun toQueryString(escapeSyntaxParser: EscapeQuerySyntax): CharSequence

convert to a query string understood by the query parser

Link copied to clipboard
open override fun toString(): String

Every implementation of this class should return pseudo xml like this:

Link copied to clipboard
open override fun unsetTag(tagName: String)

Unset a tag. tagName will be converted to lowercase.