Class FileIndex
java.lang.Object
ai.redouble.demo.extract.FileIndex
The rudimentary index: every extracted text with its vector, in memory, searched by
cosine. What a deployment replaces with pgvector or any vector store; the shape a search
needs is all that is here. Vectors are comparable only with vectors from the model that
produced them, so the index records its model and refuses a query embedded by another.
The index is also what the extraction leaves behind for the next workflow: every
document's whole text, by path, which the pricing demo reads.
- Since:
- 0.1 (2026-09-14)
- Author:
- Andrey Santrosyan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow much of a text is embedded: the head, which is what a search question is usually about. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INDEXED_CHARS
public static final int INDEXED_CHARSHow much of a text is embedded: the head, which is what a search question is usually about. The whole text is kept.- See Also:
-
-
Constructor Details
-
FileIndex
public FileIndex()
-
-
Method Details
-
put
-
size
public int size() -
texts
-
getModelId
-
clear
public void clear() -
search
The closest entries to a query vector, best first.
-