Skip to main content

TextGraphSearchRequest

Struct TextGraphSearchRequest 

Source
pub struct TextGraphSearchRequest {
Show 15 fields pub graph_name: String, pub query: String, pub k: u32, pub ef: u32, pub skip_server_llm: bool, pub extra_queries: Vec<String>, pub fact_k: u32, pub chunk_k: u32, pub include_answer_bundle: bool, pub granularities: Vec<String>, pub rrf_k: u32, pub conflict_policy: i32, pub include_dissent: bool, pub entity_consolidate: bool, pub context_date: String,
}

Fields§

§graph_name: String§query: String

raw text — gateway embeds this

§k: u32§ef: u32

0 = default

§skip_server_llm: bool

Backward-compatibility flag only. Gateway now uses server-side unified inference mode configuration for all requests.

§extra_queries: Vec<String>

Optional caller-provided rewritten queries for better retrieval. Each entry is embedded and searched alongside the main query. Used by MCP plugins where the host LLM generates rewrites at zero cost.

§fact_k: u32

Per-type result limits. When set (> 0), the response additionally populates fact_results and chunk_results with at most this many entries each. The combined results field is always populated for backward compatibility.

max extracted-fact results (0 = default 7)

§chunk_k: u32

max raw-chunk results (0 = default 5)

§include_answer_bundle: bool

When true, the gateway also returns a response-level answer-oriented evidence bundle built from the final ranked result set.

§granularities: Vec<String>

(#827 LongMemEval Phase 5a) Multi-granularity ingest + RRF fusion. When non-empty, the gateway runs one ANN ranking per requested granularity (sentence/round/session/fact), folds each to sessions, and fuses the per-granularity session rankings via Reciprocal Rank Fusion. Empty ⇒ legacy sentence-only behavior (zero regression). Recognized values: “sentence”, “round”, “session”, “fact”.

§rrf_k: u32

RRF constant k in score(d) = Σ_g weight_g / (rrf_k + rank_g(d)). 0 ⇒ default 60 (the Elasticsearch/OpenSearch rrf retriever default).

§conflict_policy: i32

Conflict-as-data per-request opt-in (issue #812 / #783). When set to a value other than UNSPECIFIED, the gateway runs a read-time conflict re-rank over the final result set: it scans contradicts edges, groups contradictory claims into conflict sets, arbitrates each set with this policy (PR #711), and demotes the losing claims below the winner (never removing them) before truncating to k. UNSPECIFIED = use the graph/env default (off unless configured) → byte-identical to pre-#812 behaviour.

§include_dissent: bool

When true, conflict_resolutions_json includes the full per-loser detail (demoted_score, reason) for every demoted claim. When false, the JSON is still emitted for any resolved set but with the loser list collapsed to node ids only. No effect unless conflict_policy fires.

§entity_consolidate: bool

(#830 LongMemEval Phase 5d) Read-time entity consolidation. When true, the gateway dereferences each query entity term through the persisted gcanon: identity cluster (Phase 5c) and OR-expands retrieval over the cluster’s surface forms via the existing load_alias_map query-expansion seam, so evidence written under any surface in the cluster is recalled regardless of which surface the query used. Each consolidated result is stamped with canonical_entity_id. Default false ⇒ byte-identical to pre-#830 behaviour; a gcanon: miss / resolution-off falls back to today’s recall (never an error). Honoured only when entity resolution is enabled (this flag OR the STATELET_ENTITY_RESOLVE env default).

§context_date: String

Optional caller-supplied reference date for relative-time queries and the response-level answer-oriented memory pack. Kept out of query so date tokens do not perturb retrieval ranking.

Implementations§

Source§

impl TextGraphSearchRequest

Source

pub fn conflict_policy(&self) -> ConflictPolicy

Returns the enum value of conflict_policy, or the default if the field is set to an invalid enum value.

Source

pub fn set_conflict_policy(&mut self, value: ConflictPolicy)

Sets conflict_policy to the provided enum value.

Trait Implementations§

Source§

impl Clone for TextGraphSearchRequest

Source§

fn clone(&self) -> TextGraphSearchRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TextGraphSearchRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TextGraphSearchRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for TextGraphSearchRequest

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for TextGraphSearchRequest

Source§

fn eq(&self, other: &TextGraphSearchRequest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextGraphSearchRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more