Class: IndexNode<T>
TextNode is the default node type for text. Most common node type in LlamaIndex.TS
Extends
TextNode
<T
>
Type parameters
• T extends Metadata
= Metadata
Constructors
new IndexNode()
new IndexNode<
T
>(init
?):IndexNode
<T
>
Parameters
• init?: IndexNodeParams
<T
>
Returns
IndexNode
<T
>
Overrides
Source
packages/core/dist/schema/index.d.ts:122
Properties
embedding?
optional
embedding:number
[]
Inherited from
Source
packages/core/dist/schema/index.d.ts:51
endCharIdx?
optional
endCharIdx:number
Inherited from
Source
packages/core/dist/schema/index.d.ts:98
excludedEmbedMetadataKeys
excludedEmbedMetadataKeys:
string
[]
Inherited from
TextNode
. excludedEmbedMetadataKeys
Source
packages/core/dist/schema/index.d.ts:53
excludedLlmMetadataKeys
excludedLlmMetadataKeys:
string
[]
Inherited from
TextNode
. excludedLlmMetadataKeys
Source
packages/core/dist/schema/index.d.ts:54
id_
id_:
string
The unique ID of the Node/Document. The trailing underscore is here to avoid collisions with the id keyword in Python.
Set to a UUID by default.
Inherited from
Source
packages/core/dist/schema/index.d.ts:50
indexId
indexId:
string
Source
packages/core/dist/schema/index.d.ts:121
metadata
metadata:
T
Inherited from
Source
packages/core/dist/schema/index.d.ts:52
metadataSeparator
metadataSeparator:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:99
relationships
relationships:
Partial
<Record
<NodeRelationship
,RelatedNodeType
<T
>>>
Inherited from
Source
packages/core/dist/schema/index.d.ts:55
startCharIdx?
optional
startCharIdx:number
Inherited from
Source
packages/core/dist/schema/index.d.ts:97
text
text:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:95
textTemplate
textTemplate:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:96
Accessors
childNodes
get
childNodes():undefined
|RelatedNodeInfo
<T
>[]
Returns
undefined
| RelatedNodeInfo
<T
>[]
Source
packages/core/dist/schema/index.d.ts:66
hash
nextNode
get
nextNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:64
parentNode
get
parentNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:65
prevNode
get
prevNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:63
sourceNode
get
sourceNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:62
type
get
type():ObjectType
Returns
Source
packages/core/dist/schema/index.d.ts:123
Methods
asRelatedNodeInfo()
asRelatedNodeInfo():
RelatedNodeInfo
<T
>
Returns
Inherited from
Source
packages/core/dist/schema/index.d.ts:69
clone()
Returns
Inherited from
Source
packages/core/dist/schema/index.d.ts:76
generateHash()
generateHash():
string
Generate a hash of the text node. The ID is not part of the hash as it can change independent of content.
Returns
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:106
getContent()
getContent(
metadataMode
?):string
Parameters
• metadataMode?: MetadataMode
Returns
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:108
getEmbedding()
getEmbedding():
number
[]
Returns
number
[]
Inherited from
Source
packages/core/dist/schema/index.d.ts:68
getMetadataStr()
getMetadataStr(
metadataMode
):string
Parameters
• metadataMode: MetadataMode
Returns
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:109
getNodeInfo()
getNodeInfo():
object
Returns
object
end
end:
undefined
|number
start
start:
undefined
|number
Inherited from
Source
packages/core/dist/schema/index.d.ts:111
getText()
getText():
string
Returns
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:115
setContent()
setContent(
value
):void
Parameters
• value: string
Returns
void
Inherited from
Source
packages/core/dist/schema/index.d.ts:110
toJSON()
toJSON():
Record
<string
,any
>
Called by built in JSON.stringify (see https://javascript.info/json) Properties are read-only as they are not deep-cloned (not necessary for stringification).
Returns
Record
<string
, any
>
Inherited from
See
toMutableJSON - use to return a mutable JSON instead
Source
packages/core/dist/schema/index.d.ts:75
toMutableJSON()
toMutableJSON():
Record
<string
,any
>
Converts the object to a JSON representation. Properties can be safely modified as a deep clone of the properties are created.
Returns
Record
<string
, any
>
- The JSON representation of the object.
Inherited from
Source
packages/core/dist/schema/index.d.ts:82