Skip to content
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

Text Phrase Prefix function generates incorrect JSON #69

Closed
jamestoyer opened this issue Jul 31, 2012 · 1 comment
Closed

Text Phrase Prefix function generates incorrect JSON #69

jamestoyer opened this issue Jul 31, 2012 · 1 comment

Comments

@jamestoyer
Copy link

It appears incorrect JSON is being generated when constructing a Text Phrase Prefix query. Currently the JSON generated is something like (note the incorrect type):

{
  "query": {
    "text": {
      "name": {
        "type": "text_phrase_prefix",
        "query": "harry p",
        "operator": "and"
      }
    }
  }
}

Instead it should be (with the correct type)

{
  "query": {
    "text": {
      "name": {
        "type": "phrase_prefix",
        "query": "harry p",
        "operator": "and"
      }
    }
  }
}

Or

{
    "query": {
        "text_phrase_prefix" : {
            "name" : {
                "query" : "harry p",
                "operator" : "and"
            }
        }
    }
}
@rodrigopalhares
Copy link

In my tests, the problem occur in text phrase too.
With the wrong type name, the elastic was working like boolean ("harry" AND "p") rather than "harry p".
Fixed: #70

@Mpdreamz Mpdreamz closed this as completed Aug 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants