-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cql support for confluence connector #2679
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request adds CQL (Confluence Query Language) support to the Confluence connector in Danswer, enhancing its querying capabilities and flexibility.
- Introduced a new
DanswerConfluence
class in the backend to handle CQL queries - Added advanced configuration options in the frontend, including a CQL query field
- Updated
ConfluenceConnector
class to utilize CQL for fetching pages and time-based filtering - Simplified the
ListInput
component in the frontend by using a reusableTextArrayField
- Implemented an 'Advanced Options' toggle in the
DynamicConnectorCreationForm
for better user experience
5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
@@ -1,5 +1,6 @@ | |||
"use client"; | |||
|
|||
import React from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Unnecessary import of React in a file using 'use client' directive
@@ -56,8 +57,55 @@ | |||
) | |||
|
|||
|
|||
class DanswerConfluence(Confluence): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this class is necessary to make cql quries work. read comment
def _replace_cql_time_filter( | ||
cql_query: str, start_time: datetime, end_time: datetime | ||
) -> str: | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ensures that the cql properly contains no overlapping lastmodified query parameters
For example, entering "https://your-company.atlassian.net/wiki" as the Wiki Base URL, "KB" as the Space, and "164331" as the Page ID will index the specific page at https:///your-company.atlassian.net/wiki/spaces/KB/pages/164331/Page. If you leave the Page ID empty, it will index the entire KB space. | ||
|
||
Selecting the "Index Recursively" checkbox will index the specified page and all of its children.`, | ||
subtext: `Specify the base URL of your Confluence instance, the space name, and optionally a specific page ID to index. If no page ID is provided, the entire space will be indexed. If no space is specified, all available Confluence spaces will be indexed.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
less yapping
@@ -23,6 +24,61 @@ const DynamicConnectionForm: FC<DynamicConnectionFormProps> = ({ | |||
setSelectedFiles, | |||
values, | |||
}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added an advanced_values section
No description provided.