You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/03/16 05:53:36 UTC

[jira] [Updated] (SOLR-5052) eDisMax Field Aliasing behaving oddly when invalid field is present

     [ https://issues.apache.org/jira/browse/SOLR-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-5052:
-------------------------------

    Fix Version/s:     (was: 4.7)
                   4.8

> eDisMax Field Aliasing behaving oddly when invalid field is present
> -------------------------------------------------------------------
>
>                 Key: SOLR-5052
>                 URL: https://issues.apache.org/jira/browse/SOLR-5052
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.3.1
>         Environment: AWS / Ubuntu
>            Reporter: Trey Grainger
>            Priority: Minor
>              Labels: alias, edismax, parser, query
>             Fix For: 4.8
>
>
> Field Aliasing for the eDisMax query parser behaves in a very odd manner if an invalid field is specified in any of the aliases.  Essentially, instead of throwing an exception on an invalid alias, it breaks all of the other aliased fields such that they will only handle the first term correctly.  Take the following example:
> /select?defType=edismax&f.who.qf=personLastName_t^30 personFirstName_t^10&f.what.qf=itemName_t companyName_t^5&f.where.qf=cityName_t^10 INVALIDFIELDNAME^20 countryName_t^35 postalCodeName_t^30&q=who:(trey grainger) what:(solr) where:(atlanta, ga)&debugQuery=true&df=text
> The terms "trey", "solr" and "atlanta" correctly search across the aliased fields, but the terms "grainger" and "ga" are incorrectly being searched across the default field ("text").  Here is parsed query from the debug:
> <lst name="debug">
> <str name="rawquerystring">
> who:(trey grainger) what:(solr) where:(decatur, ga)
> </str>
> <str name="querystring">
> who:(trey grainger) what:(solr) where:(decatur, ga)
> </str>
> <str name="parsedquery">
> (+(DisjunctionMaxQuery((personFirstName_t:trey^10.0 | personLastName_t:trey^30.0)) DisjunctionMaxQuery((text:grainger)) DisjunctionMaxQuery((itemName_t:solr | companyName_t:solr^5.0)) DisjunctionMaxQuery((postalCodeName_t:decatur^30.0 | countryName_t:decatur^35.0 | cityName_t:decatur^10.0)) DisjunctionMaxQuery((text:ga))))/no_coord
> </str>
> <str name="parsedquery_toString">
> +((personFirstName_t:trey^10.0 | personLastName_t:trey^30.0) (text:grainger) (itemName_t:solr | companyName_t:solr^5.0) (postalCodeName_t:decatur^30.0 | countryName_t:decatur^35.0 | cityName_t:decatur^10.0) (text:ga))
> </str>
> I think the presence of an invalid field in a qf parameter should throw an exception (or throw the invalid field away in that alias), but it shouldn't break the aliases for other fields.  
> For the record, if there are no invalid fields in any of the aliases, all of the aliases work.  If there is one invalid field in any of the aliases, all of the aliases act oddly like this.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org