Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Sep 11, 2012
  1. @willkg
  2. @willkg
Commits on Sep 4, 2012
  1. @willkg

    Implement MappingType and rewrite everything around it

    willkg authored
    tl;dr: This is a big rewrite with huge API-breaking changes.
    
    This replaces the old model-type system with the new MappingType
    system. This adds a degree of separation between models (traditionally
    stored in a db) and documents (stored in ElasticSearch).
    
    Untyped S works just like in v0.4 with the exception that if you
    don't specify values_dict or values_list, you now get back a list
    of DefaultMappingType which are slightly more useful than dicts.
    
    You can now create an S typed by a MappingType which makes it easier
    to specify the index and doctype, but also allows you to tie
    business logic to search results and also tie that back to db
    objects in a lazy-loading way. For example, say you had a description
    field and wanted to have a truncated version of it::
    
        class MyMappingType(MappingType):
            def description_truncated(self):
                return self.description[:100]
    
        res = list(S(MyMappingType).query(description__text='stormy night'))[0]
    
        print res.description_truncated()
    
    Also, inextricably linked with this commit is a minor rewrite of the
    test suite. They should run faster now, are better organized, and should
    be easier to write in the future. test_django.py doesn't look like it
    was written by a shrewdness of apes any more.
    
    Also fixed a bug where `fields` was affected by ``values_list`` and
    ``values_dict`` calls---the two need to be separated.
  2. @willkg

    Tweak the search chapter title

    willkg authored
    Since it uses the ES Search API, it's better to call it "Searching
    with S" rather than "Querying with S".
  3. @willkg

    Issue 54. Add docs for order-by

    willkg authored
    This also adds API documentation. It's not great because the docstrings
    need work, but it's better!
  4. @willkg

    Tweak MLT code; add docs

    willkg authored
    * tweaks the MLT class so that s isn't required anymore
    * adds an es argument
    * adds documentation
    * adds two more tests to make sure the s vs. index/doctype works
      correctly
Commits on Aug 17, 2012
  1. @willkg

    Issue 51. Implement .demote()

    willkg authored
    This implements boosting query support, though it does it by dealing
    with the positive and negative queries as two separate things.
Commits on Jul 28, 2012
  1. @willkg

    Issue 27, 50. Add query_string and text_phrase.

    willkg authored
    * add support for query_string and text_phrase
    * adds documentation for both
    * adds handling for 'term' action
    * nixes documentation for startswith which is deprecated for prefix
      (though both work for now)
    * adds documentation for queries vs. filters
    * adds tests for the different query types
Commits on Jul 25, 2012
  1. @willkg

    Fix docs on facet_counts

    willkg authored
Commits on Jul 21, 2012
  1. @willkg

    Issue 42. Implement highlight

    willkg authored
    This is a first pass at implementing highlight and it implements
    all the bits I need for SUMO.
    
    However, there's a lot of other stuff you can do with highlight
    and the docs I wrote don't really cover everything like why
    pre/post_tags need to be lists, fragment lengths, .. So there's
    more to do, but that can be done under the auspices of a different
    issue..
Commits on Jul 19, 2012
  1. @willkg

    Issue 28. Implement query-time field boosts

    willkg authored
    This adds support for query-time field boosts. The docs cover how they
    work and get used.
    
    I also cleaned up _process_queries a little to make it less redundant
    and I fixed the test_query.py which was using a typed S and shouldn't
    have been.
Commits on Jul 5, 2012
  1. @willkg

    Issue 38. Explain support

    willkg authored
    This adds support for 'explain' flag in searches, documentation, tests,
    and a function that formats the resulting explanation output so it's
    human-readable.
    
    The latter is kind of a nice-to-have, so I stuck it in utils.py. It's
    not documented, yet, because I figure it could use some work.
Commits on Jul 3, 2012
  1. @willkg

    Fix section on count/len in docs

    willkg authored
    q.count() != len(q)
    
    Suggesting those are the same is wrogn!
  2. @willkg

    Add seealso sections to docs

    willkg authored
    Adds links to the ES docs in relevant portions of the documentation.
  3. @willkg

    Issue 43. Reimplement facets

    willkg authored
    This reworks facets so that the API is cleaner and easier to use. It
    now has a .facet() which acts as a shorthand but doesn't do things
    you might not expect and it has a .facet_raw() which yields unto
    you the full expressive power of the ES facet.
    
    This adds some more tests and documentation and updates the CHANGELOG,
    too.
Commits on Jul 2, 2012
  1. @willkg

    Fix list results

    willkg authored
    If there was only one item in self.fields, then you'd end up with
    a flat list of things instead of a list of tuples. We want that
    to be consistent, though, so if we know we're in that situation, we
    fix it accordingly.
    
    This is a little awkward if you really want a flat list. Maybe we
    should make that easier in the future.
  2. @willkg

    Update docs

    willkg authored
    * updates and clarifies a bunch of bits in the documentation.
    * updates the documentation in respects to typed S and untyped S
      and search results and all that.
    * went through and tested the facet code. This updates the facet
      documentation.
    * PEP-257 fixes
Commits on Jun 28, 2012
  1. @willkg

    Issue 41. Move django bits to contrib

    willkg authored
    This reworks the codebase so that it doesn't require Django. There
    are some API breaking things here, but hopefully the changes required
    for users will be minimal.
Commits on Jun 16, 2012
  1. @willkg

    Tweak F so that it allows for F()

    willkg authored
    This is something I implemented in the sumo branch to allow for an empty
    F. It makes it a lot easier to start with an F and add filters depending
    on what the user requested and also handle the case where there are
    no filters.
    
    e.g.
    
        f = F()
        f = f | F(tag='awesome')
    
    Prior to this change, that would result in:
    
        {"or_": [{}, {"tag": "awesome"}]}
    
    which makes ES grumpy and for good reason.
Commits on Jun 9, 2012
  1. @willkg

    More query doc work

    willkg authored
    Ricky asked what the elasticsearch JSON looks like if you have filters
    and queries in it. I thought about that and decided to add more to the
    overview section so that there's a big example coupled with what it
    equates to in curl and then the rest of the document talks about
    individual pieces.
    
    I also added a separate section about S.
Commits on Jun 8, 2012
  1. @willkg

    Overhaul docs

    willkg authored
    This adds contributor docs and cleans up some of the elasticutils
    usage docs, too. It adds a lot of examples and expands on the existing
    text.
    
    This also adds a requirements-dev.txt which makes it a little easier
    to install for hacking.
    
    Still a lot of docs-work to do, but I think this is a nice first pass.
Commits on Sep 14, 2011
  1. @willkg

    Fixes minor documentation issues

    willkg authored
    * the docs didn't mention the repository, so doing a google search leads you
      to rfd.org but at that point, you don't know where to get the code or how
      to download it or anything.
    * fixes some reST formatting issues and sphinx-docs errors
    * (cosmetic) removes an unused import in setup.py
    * tweaks some configure documentation
Commits on Aug 31, 2011
  1. @erikrose
Commits on Aug 11, 2011
  1. @seanmonstar
  2. @davedash

    Minor doc tweaks

    davedash authored
Commits on Jul 6, 2011
  1. @rfreebern
Commits on Jun 10, 2011
  1. @davedash

    Documentaion

    davedash authored
Something went wrong with that request. Please try again.