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

Use QueryResult Object for returning data from backends #57

Closed
rufuspollock opened this Issue Mar 10, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@rufuspollock
Copy link
Member

rufuspollock commented Mar 10, 2012

At present do not have a QueryResult but just return a set of "document" dicts/hashes (and have the Backend explicitly set total on Dataset in form of docCount. Issues:

  • Will need this once we have facets
  • Every backend needs to repeat setting of docCount on backend

Pros of current system:

  • We allow Backends to whatever they want without having to conform to a specific QueryResult construct (and anyway Dataset is sort of our QueryResult ...)

Structure of query result:


{
  total: // total number of results
  hits: [ // as per elasticsearch
    {
       _score:   // optional match score
       _type: // optional document type
       _source: { // document data
       }
    } 
  ],
  facets: { //
  }
}

@ghost ghost assigned rufuspollock Apr 1, 2012

rufuspollock added a commit that referenced this issue Apr 1, 2012

[#57,backend,refactor][s]: create a recline.Backend.Base model which …
…other backends inherit from.

* At the moment this added little other than a cleaner structure but will help with change for #57.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment