You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from typing import Any
from sqlalchemy.orm import Session
import json
from ktem.index.file import FileIndex
from ktem.db.models import engine
from ..base import BaseFileIndexIndexing, BaseFileIndexRetriever
from .pipelines import GraphRAGIndexingPipeline, GraphRAGRetrieverPipeline
replace is_all, sel_ids, _ = selected with:
is_all, sel_ids, _ = selected
if is_all == "all":
Index = self._resources.get("Index")
with Session(engine) as session:
all_id = session.query(Index.source_id).filter(Index.relation_type == "graph").all()
file_ids = [i[0] for i in all_id]
else:
file_ids = []
for item in sel_ids:
if item.startswith("["):
group_file_ids = json.loads(item)
file_ids.extend(group_file_ids)
else:
file_ids.append(item)
Reproduction steps
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
not only a simple selection bug
each time upload files, will create a unique id, then create a folder by id, and store light rag data in this folder.
when select multi files, pick the first file id, query the linked unique id, and the create light query.
when I have 10 PDF, upload 5 at first and then another 5. It seems that if i select all files, will only search in first 5 PDF
I am seeing same thing, it seems like LightRag will search against ALL documents that are in the same indexes no matter what you selected and will only search against documents in that same index even if you select files from multiple indexes.
I ran different test scenarios with two markup resume files
John_Doe_Resume.txt
Jane_Smith_Resume.txt
Drag & Drop each file separately to LightRag file collection
Two separate indexes are created under ktem_app_data\user_data\files\lightrag\
Query will only search against one index at a time even if both files are selected. And "Search All" button doesn't work. It will complaint no documents are selected.
When selecting multiple files in the drop down, only the first one selected will be included in the search. The others will be ignored.
Drag & Drop both files at the same time to be indexed
One index is created under ktem_app_data\user_data\files\lightrag\
Query will search both documents
Query will search both documents EVEN if I only selected one file in the drop down.
I believe LightRag can do incremental index, i.e. adding new documents will update the existing index instead of creating new one. Will be great if that can be implemented.
Description
select "Search All" or select any group in "Search in Files", empty file_ids will be sent to retriever pipeline
libs\ktem\ktem\index\file\graph\graph_index.GraphRAGIndex -> get_retriever_pipelines
import:
replace is_all, sel_ids, _ = selected with:
Reproduction steps
Screenshots
![image](https://github.com/user-attachments/assets/907929ab-b59b-443d-a795-8896418f361a)
Logs
No response
Browsers
No response
OS
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: