Disallow regex in python client querystrings

Bug #1551946 reported by Steve McLellan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Low
Steve McLellan

Bug Description

A query_string like:

    "some/swift/path"

is interpreted as ["some" REGEXP/swift/ "path"]. A single slash is an error. This isn't very intuitive, and for now we're going to disable the behavior. Regexp queries will still be possible using explicit regexp queries (https://www.elastic.co/guide/en/elasticsearch/reference/1.7/query-dsl-regexp-query.html).

Revision history for this message
Travis Tripp (travis-tripp) wrote :
Changed in searchlight:
assignee: nobody → Steve McLellan (sjmc7)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-searchlightclient (master)

Reviewed: https://review.openstack.org/286850
Committed: https://git.openstack.org/cgit/openstack/python-searchlightclient/commit/?id=e8328fd7c23ff2213488233fb3158428d3ec9664
Submitter: Jenkins
Branch: master

commit e8328fd7c23ff2213488233fb3158428d3ec9664
Author: Steve McLellan <email address hidden>
Date: Tue Mar 1 15:28:30 2016 -0600

    Escape slashes in query_strings

    Slashes (/) in query strings are treated by Elasticsearch as delimiting
    a regexp expression. This is confusing especially when operating on
    swift object paths, and in general we feel that in general the confusion
    caused by mismatched slashes isn't offset by the ability to use regexps.
    If a user really needs to run a regexp they can use the query dsl; we
    could also consider adding a flag later.

    Change-Id: I892541820b077d8eb08ae635a843d8dc84a5f55a
    Closes-Bug: #1551946

Changed in searchlight:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.