Giter Club home page Giter Club logo

django-zombodb's People

Contributors

dependabot[bot] avatar fjsj avatar gtsalles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-zombodb's Issues

Created row Type isn't deleted if whole model is deleted

Steps to reproduce:

  1. Remove whole model from models.py
  2. makemigrations
  3. migrate
  4. migrate back to migration number before deletion
  5. Error here:
    django.db.utils.ProgrammingError: type "restaurants_name_016c1c_zombodb_row_type" already exists

For now, solution is to make a custom database backend engine, like https://github.com/SectorLabs/django-postgres-extra. Then, in the custom backend, implement something like SpatialiteSchemaEditor.delete_model.

We won't fix this now since we want an easier to configure API and this is a low impact issue.

Scalability of filtering operations

Description

Say we filter the queryset as shown in the docs

Restaurant.objects.filter(
    name__startswith='Pizza'
).query_string_search(
    'name:Hut'
)

Is that a scalable solution? I suppose I'm asking whether:

  • zombodb in effect evaluates that filtered queryset, then sends a list of ids to ElasticSearch in order to filter the potential results (not scalable, as the size of the search query then grows with the number of Pizza*s in the database), or
  • does some magic (which in my mind is like creating an effective additional column of relevance which the normal filtered query is then ordered by) such that neither the search query size nor the index complexity increases with the number of things that you filter/exclude?

I'm a bit more used to django-haystack, where in order to achieve this kind of filtering scalably you'd have to have a thing you want to filter against in the search index itself. Excited by the potential of zombodb but needed to check this!

Suggestion

Please could the documentation here include a slightly more in depth note about how those filters are achieved and if it's scalable?

Add sed command on Makefile to match "# via django" lines

Description

On the dependency management part of the Makefile, remember to remove dependencies added to requirements.txt because of Django so you don't pin them as well.

sed '/django==/d' requirements.txt > requirements.tmp; mv requirements.tmp requirements.txt
sed '/# via django$$/d' requirements.txt > requirements.tmp; mv requirements.tmp requirements.txt

Migrations should always use settings.ZOMBODB_ELASTICSEARCH_URL not its value

  • django_zombodb version: 0.1.4
  • Postgres version: 10.7
  • ZomboDB version: 10-1.0.3
  • Django version: 2.1.7
  • Python version: 3.6.4
  • Operating System: Ubuntu 16.04

Description

When we generate migrations, the result is:

migrations.AddIndex(
    model_name='xmodel',
    index=django_zombodb.indexes.ZomboDBIndex(
        fields=['name', 'slug'], 
        name='xmodel_slug_f88d55_zombodb', 
        url='http://127.0.0.1:9200/'
    ),
),

The value of url kwarg should be settings.ZOMBODB_ELASTICSEARCH_URL because on different environments we might have different ElasticSearch URLs. Running migrations in production or staging/qa, will fail because ES has a different URL.

This should be the correct output:

migrations.AddIndex(
    model_name='xmodel',
    index=django_zombodb.indexes.ZomboDBIndex(
        fields=['name', 'slug'], 
        name='xmodel_slug_f88d55_zombodb', 
        url=settings.ZOMBODB_ELASTICSEARCH_URL
    ),
),

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.