You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Trey Grainger (JIRA)" <ji...@apache.org> on 2013/07/20 19:45:18 UTC
[jira] [Created] (SOLR-5052) eDisMax Field Aliasing behaving oddly
when invalid field is present
Trey Grainger created SOLR-5052:
-----------------------------------
Summary: 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
Fix For: 4.5
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org