Code Monkey home page Code Monkey logo

haystack-elasticsearch5's People

Contributors

alkalit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

haystack-elasticsearch5's Issues

Source code license

Hi,

Thanks for working on this backend. Currently it seems like one of the best/simplest options in using Elasticseaech 5.x with Haystack.

What is the license for haystack-elasticsearch5 ?
Is it going to be released using some standard open source license like MIT, Apache2, BSD, ... etc? .

Text field facet returns tokenized/analyzed terms

Hi,

I am using Elasticsearch 5.x with this backed and so far things seem to be working fine except when faceting text fields the returned facet strings seem to be tokenized, for example facet values are converted to lowercase and multi word field values a split into multiple facets.

I think this is due to something similar to whats described at https://www.elastic.co/guide/en/elasticsearch/guide/current/aggregations-and-analysis.html

Assuming I have following records with a field called state

{ "state" : "New York" }
{ "state" : "New Jersey" }
{ "state" : "New Mexico" }
{ "state" : "New York" }
{ "state" : "New York" }

Whenever I run searchqueryset.facet('state') I get something like;-

[
    ("new", 5),
    ("york", 3),
    ("jersey", 1),
    ("mexico", 1)
]

Instead of

[
    ("New York", 3),
    ("New Jersey", 1),
    ("New Mexico", 1)
]

I guess one of the potential soultion could be utilizing Elasticsearch multi-fields in indexing faceted fields and in terms aggregation.

I tried to fork and use Elasticsearch multi-fields with this backend and things seems to be working as expected so far, check https://github.com/machakux/haystack-elasticsearch5 (backend.py). In this case you don't have to remove faceted=True in your in your haystack search index fields

What do you think? Am I missing something?

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.