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

ED: Remove Datasets from search #17

Open
SpeckiJ opened this issue Oct 26, 2023 · 6 comments
Open

ED: Remove Datasets from search #17

SpeckiJ opened this issue Oct 26, 2023 · 6 comments
Assignees
Milestone

Comments

@SpeckiJ
Copy link
Member

SpeckiJ commented Oct 26, 2023

I want to remove my dataset from the full text search (after i initially added it) because the paper this dataset is based on was retracted

@ridoo ridoo moved this from Backlog to Ready in 52°North Innovation Prize Oct 26, 2023
@ridoo ridoo moved this from Ready to Backlog in 52°North Innovation Prize Oct 26, 2023
@ridoo ridoo added this to the must have milestone Oct 26, 2023
@ridoo
Copy link
Member

ridoo commented Oct 26, 2023

Opt-Out

@ridoo
Copy link
Member

ridoo commented Jun 4, 2024

  • Nachträglich aus dem Index nehmen
    • Abgleich mit Datenrepository
    • Neu trainieren oder unlearn?
  • Idea for "end user": Können Ergebnisse mit ähnlichem "Kriterien-Index" verglichen werden?

@ridoo ridoo moved this from Backlog to Ready in 52°North Innovation Prize Jun 17, 2024
@simeonwetzel simeonwetzel moved this from Ready to In Progress in 52°North Innovation Prize Jun 27, 2024
@ridoo
Copy link
Member

ridoo commented Jul 12, 2024

Two step approach

  • Get Id of dataset (optionally in combination with search parameters)
  • Delete Endpoint where the delete happens (by the data steward)

@simeonwetzel
Copy link
Collaborator

Hier sind diese endpoints implementiert:
https://github.com/52North/innovation-prize/blob/dev/search-app/server/app/server.py

# Clear complete index
@app.get("/clear_index")
async def clear_index(index_name: str):
    if index_name not in (indexes, 'geojson'):
        raise HTTPException(status_code=400, detail="Invalid index name")
    elif index_name == 'geojson':
       local_file_indexer._clear()
    else: 
        indexes[index_name]._clear()
    return {'message': 'Index cleared'}

# Get specific document from index
@app.get("/retrieve_with_id")
async def retrieve_with_id(index_name: str, _id: str):
    if index_name not in indexes:
        raise HTTPException(status_code=400, detail="Invalid index name")
    retrieved_id = indexes[index_name]._get_doc_by_id(_id)
    return {'id': retrieved_id}

# Delete specifc document from index
@app.get("/remove_doc_from_index")
async def remove_doc_from_index(index_name: str, _id: str):
    if index_name not in indexes:
        raise HTTPException(status_code=400, detail="Invalid index name")
    result = indexes[index_name]._delete_doc_from_index(_id)
    return result

@simeonwetzel simeonwetzel self-assigned this Jul 12, 2024
@simeonwetzel
Copy link
Collaborator

Todo: Authentification mechanism for upsert/delete in index

@simeonwetzel
Copy link
Collaborator

Added an OAuth2-based authentification mechanism with api-key. The provider can specify api-keys in the config file and the user needs to add the key to the request header when requesting the API-endpoint. The authentification mechanism was added to all security-relevant endpoints

async def get_api_key(api_key_header: str = Security(api_key_header)):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants