diff --git a/backend/ee/onyx/server/query_and_chat/query_backend.py b/backend/ee/onyx/server/query_and_chat/query_backend.py index c8c0acfc4..b2837283f 100644 --- a/backend/ee/onyx/server/query_and_chat/query_backend.py +++ b/backend/ee/onyx/server/query_and_chat/query_backend.py @@ -29,6 +29,7 @@ from onyx.configs.onyxbot_configs import MAX_THREAD_CONTEXT_PERCENTAGE from onyx.context.search.enums import LLMEvaluationType from onyx.context.search.models import BaseFilters from onyx.context.search.models import SavedSearchDocWithContent +from onyx.context.search.models import SearchDoc from onyx.context.search.models import SearchRequest from onyx.context.search.pipeline import SearchPipeline from onyx.context.search.utils import dedupe_documents @@ -316,7 +317,7 @@ class FastSearchResult(BaseModel): class FastSearchResponse(BaseModel): """Response from the fast search endpoint.""" - results: list[FastSearchResult] + results: list[SearchDoc] total_found: int @@ -368,13 +369,24 @@ def get_fast_search_response( # Convert chunks to response format results = [ - FastSearchResult( + SearchDoc( document_id=chunk.document_id, - chunk_id=chunk.chunk_id, - content=chunk.content, - source_links=chunk.source_links, - score=chunk.score, + chunk_ind=chunk.chunk_id, + semantic_identifier=chunk.semantic_identifier, + link=None, # Assuming source_links might be used for link + blurb=chunk.content, + source_type=chunk.source_type, # Default source type + boost=0, # Default boost value + hidden=False, # Default visibility metadata=chunk.metadata, + score=chunk.score, + is_relevant=None, + relevance_explanation=None, + match_highlights=[], + updated_at=None, + primary_owners=None, + secondary_owners=None, + is_internet=False, ) for chunk in chunks ] diff --git a/web/Dockerfile b/web/Dockerfile index a57122074..4e7d07dc1 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -88,7 +88,7 @@ ARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY ENV NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY} # Use NODE_OPTIONS in the build command -RUN NODE_OPTIONS="${NODE_OPTIONS}" npx next build +RUN NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=4096" npx next build # Step 2. Production image, copy all the files and run next FROM base AS runner diff --git a/web/src/app/search/SearchPage.tsx b/web/src/app/search/SearchPage.tsx index 3f3da5256..b3cec4ff0 100644 --- a/web/src/app/search/SearchPage.tsx +++ b/web/src/app/search/SearchPage.tsx @@ -998,6 +998,7 @@ export default function SearchPage({ } if (response.documents.length > 0) { + alert(JSON.stringify(response.documents[0])); setSearchResults(response.documents); // Count results by source type