Coder Social home page Coder Social logo

Comments (4)

rhsimplex avatar rhsimplex commented on July 28, 2024

Hey @walidsa3d

Should be easy to implement, see https://github.com/pavlovai/match/blob/master/src/match/server.py#L43

from image-match.

bhavikshah1995 avatar bhavikshah1995 commented on July 28, 2024

Page not found - Could you please reiterate how to remove images from the index, and also possible functions I can use with ses?

from image-match.

bhavikshah1995 avatar bhavikshah1995 commented on July 28, 2024

#108

from image-match.

taylorjdawson avatar taylorjdawson commented on July 28, 2024

#108 would delete an entire index I think @walidsa3d want's to delete a single image.
I also think this is out of the scope of image-match. Adding and searching images need wrappers since it deals with the signature algorithm.
Try this:

from elasticsearch import Elasticsearch
es = Elasticsearch()
IMAGE_NAME = 'my_awesome_image.jpg'
query = f'path:"{IMAGE_NAME}"'
es.delete_by_query(index='images', doc_type='image', body={}, q=query)

The doc_type and index parameters are set by image-match here.

Additionally, I set the body param to an empty object as the method requires it but I am using the uri search query instead of using the body.

Resources:
Using Elasticsearch's delete by query
elasticsearch-py's method delete_by_query

from image-match.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.