searchlight-ui does not honor facet types when generating query from magic search

Bug #1564147 reported by Travis Tripp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
High
Travis Tripp

Bug Description

Searchlight-UI

The facets returned from searchlight include their type. The searchlight query generator is not using the correct type of query at times. For example, a volume.size can do range queries, but the searchlight UI query generator is using a term query, resulting in a BadRequest from elasticsearch.

Changed in searchlight:
assignee: nobody → Travis Tripp (travis-tripp)
importance: Undecided → High
tags: added: searchlight-ui
Changed in searchlight:
milestone: none → mitaka-rc2
Changed in searchlight:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to searchlight-ui (master)

Fix proposed to branch: master
Review: https://review.openstack.org/300107

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to searchlight-ui (master)

Reviewed: https://review.openstack.org/300107
Committed: https://git.openstack.org/cgit/openstack/searchlight-ui/commit/?id=fb500c343bf17c35de200503a943bed2d44d3d2e
Submitter: Jenkins
Branch: master

commit fb500c343bf17c35de200503a943bed2d44d3d2e
Author: Travis Tripp <email address hidden>
Date: Thu Mar 31 11:35:30 2016 -0600

    Fix issues when magic search facet uses range queries

    The facets returned from searchlight include their type.
    The searchlight query generator is not using the correct
    type of query at times. For example, a volume.size can do
    range queries, but the searchlight UI query generator is
    using a term query, resulting in a BadRequest from elasticsearch.

    This fix changes it so that we treat all facets as
    field limited query strings. This will now ensure
    that the search syntax for full text search is
    consistent with what you can put in for selecting
    a single facet.

    Example tests:

    Select Type: Volume
    Select Type: Size
     Inputs (try one at a time):
     >1
     >=1
     [1 TO 10]
     [1 TO *]
     >=1= (should result in a message that the query is invalid

    Next, put a phrase into a volume description such as:

    "Running this test = fun times"

    Then do a bunch of tests on selecting the description field
    and trying phrase and wildcard queries.

    Try others.

    In general, this seems to work much better than before with
    consistency between the inputs on full text search and facet
    limited search.

    Change-Id: Ic126eae0ae7a422e5ac6d7be98a2bea57c13fc6f
    Closes-Bug: 1564147

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.