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

trailing slash in keyword query breaks the internet #24

Open
nonword opened this issue Jun 9, 2017 · 0 comments
Open

trailing slash in keyword query breaks the internet #24

nonword opened this issue Jun 9, 2017 · 0 comments

Comments

@nonword
Copy link
Member

nonword commented Jun 9, 2017

This causes a query_shard_exception:

q=mexico y sus alrededores/

It should not. We should either escape it or pass it to ES in a different way.

This is the ES query generated currently:

{
  "from": 0,
  "size": 50,
  "query": {
    "function_score": {
      "query": {
        "bool": {
          "should": [
            {
              "query_string": {
                "fields": [
                  "title^10",
                  "title.folded^5",
                  "description^5",
                  "subjectLiteral^5",
                  "creatorLiteral^5",
                  "contributorLiteral",
                  "note",
                  "shelfMark"
                ],
                "query": "mexico y sus alrededores/",
                "default_operator": "AND"
              }
            }
          ]
        }
      }
    }
  },
  "min_score": 0.65,
  "sort": [
    "_score"
  ]
}
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

1 participant