lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Kaiser <m...@nils-kaiser.de>
Subject Problems with EDisMax field aliases for multiple fields on Solr 3.6.1
Date Wed, 08 Aug 2012 11:41:34 GMT
Hey,

I'm trying to use field aliases that reference multiple fields on Solr 
3.6.1 (1362471) as stated in the EDisMax documentation 
(http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming).

If I use an alias for a single field, everything is fine, but once I use 
an alias with more than one field (using syntax 
f.who.qf=name^5.0,namealias^2.0 as in the docs), the alias stops working.

Examples
(base url is 
http://localhost:8982/solr/select?debugQuery=true&fq=type%3AUser&q=name%3Amaier&fl=*+score&defType=edismax&rows=10

+ params below, debug shows how f.name.qf is displayed in debug xml view)

1) &f.name.qf=last_name_text
- returns 39 results, debug: <str name="f.name.qf">last_name_text</str>

2) &f.name.qf=last_name_text,first_name_text
- returns 0 results, debug: <str 
name="f.name.qf">last_name_text,first_name_text</str>

3) &f.name.qf=last_name_text%2Cfirst_name_text
- returns 0 results, debug: <str 
name="f.name.qf">last_name_text,first_name_text</str>

4) &f.name.qf=first_name_text&f.name.qf=last_name_text
- returns 0 results, debug: <arr 
name="f.name.qf"><str>first_name_text</str><str>last_name_text</str></arr>

5) &f.name.qf=last_name_text&f.name.qf=first_name_text
- returns 39 results, debug: <arr 
name="f.name.qf"><str>last_name_text</str><str>first_name_text</str></arr>

6) &f.name.qf=last_name_text^2.0,first_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
"2.0,first_name_text"

7) &f.name.qf=last_name_text^2.0%2Cfirst_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
"2.0,first_name_text"

Comments:

1) works as expected, but uses only one field for the alias
2) does not work, but this format is explained in the docs if I 
understood it right
3) tried this to try escaping issues, but xml shows the same value
4) does not work, because SOLR seems to take first value only
5) does work, but only because SOLR takes first value (see 4)
6), 7) lead to http error, but format is same as in docs??

Any ideas whether I am doing something wrong here, or the docs are 
misleading, or there is a bug in the SOLR version I use?

Best,

Nils

Mime
View raw message