All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.senseidb.search.client.json.req.query.span.SpanNear Maven / Gradle / Ivy

package com.senseidb.search.client.json.req.query.span;

import java.util.List;

import com.senseidb.search.client.json.CustomJsonHandler;
import com.senseidb.search.client.json.JsonField;
import com.senseidb.search.client.json.req.query.Query;
import com.senseidb.search.client.json.req.query.QueryJsonHandler;

/**
 * 

* Matches spans which are near one another. One can specify slop, the * maximum number of intervening unmatched positions, as well as whether matches * are required to be in-order. The span near query maps to Sensei * SpanNearQuery. Here is an example: *

* * *

* The clauses element is a list of one or more other span type * queries and the slop controls the maximum number of intervening * unmatched positions permitted. *

* * */ @CustomJsonHandler(QueryJsonHandler.class) public class SpanNear implements Query { List clauses; private int slop; @JsonField("in_order") private boolean inOrder; @JsonField("collect_payloads") private boolean collectPayloads; private final double boost; public SpanNear(List clauses, int slop, boolean inOrder, boolean collectPayloads, double boost) { super(); this.clauses = clauses; this.slop = slop; this.inOrder = inOrder; this.collectPayloads = collectPayloads; this.boost = boost; SpanTerm.cleanBoosts(clauses); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy