Skip to content
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

fix: allow AstraDB to prevent indexing on metadata columns with long text #3003

Merged
merged 8 commits into from
May 17, 2024

Conversation

potter-potter
Copy link
Contributor

@potter-potter potter-potter commented May 10, 2024

Thanks to @erichare from AstraDB
Adds support for specifying the indexing options for various columns in Astra DB, allowing users to avoid a situation where long text columns are by-default indexed.

Changes to: test_unstructured_ingest/python/test-ingest-astra-output.py are forward looking from AstraDB

@potter-potter potter-potter changed the title fix: fix: allow AstraDB to prevent indexing on metadata columns with long text May 10, 2024
@@ -55,7 +55,8 @@ PYTHONPATH=. ./unstructured/ingest/main.py \
--token "$ASTRA_DB_TOKEN" \
--api-endpoint "$ASTRA_DB_ENDPOINT" \
--collection-name "$COLLECTION_NAME" \
--embedding-dimension "$EMBEDDING_DIMENSION"
--embedding-dimension "$EMBEDDING_DIMENSION" \
--requested-indexing-policy '{"deny": "metadata"}'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erichare Can you shed some light on why this --requested-indexing-policy results in an error. Maybe there is better json to test this attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erichare Switched this pr from draft to normal. Just in case you couldn't access the draft.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@potter-potter apologies about the delay - i was out most of yesterday. Let me test that shortly - offhand that looks right, assuming that it gets converted into a dictionary correctly, but its kind of a deeply nested object on the Astra Data API side and so i may have missed a top level attribute. Checking it out shortly...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@potter-potter i opened a small bugfix pr to merge into this branch (didn't have write access to this). It was my mistake - i was passing a single field, but the API expects a list of fields even if it's just a single one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erichare your fix looks good.

@potter-potter potter-potter marked this pull request as ready for review May 15, 2024 13:39
@potter-potter potter-potter added this pull request to the merge queue May 17, 2024
Merged via the queue into main with commit df8d39a May 17, 2024
42 checks passed
@potter-potter potter-potter deleted the potter/astradb-updates-2 branch May 17, 2024 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants