That would create an alias "loop", which is not supported.

For example,

http://localhost:8983/solr/select/?debugQuery=true&defType=edismax&f.person_first_name.qf=genre_s&f.person_last_name.qf=id&f.name.qf=name+person_first_name+person_last_name&q=name:smith

in Solr 3.6 generates a 400 response status code with this exception:

org.apache.lucene.queryParser.ParseException: Cannot parse 'name:smith ': Field aliases lead to a cycle

Maybe what you would like is an enhancement to permit an explicit refererence to the underlying field rather than the alias in an alias definition, like:

&f.name.qf=field.name+person_first_name+person_last_name

-- Jack Krupansky

-----Original Message----- From: Jamie Johnson
Sent: Friday, May 25, 2012 8:37 PM
To: solr-user@lucene.apache.org
Subject: ExtendedDisMax Field Alias Question

I was wondering if someone could explain if the following is supported
with the current EDisMax Field Aliasing.

I have a field like person_name which exists in solr, we also have 2
other fields named person_first_name and person_last_name.  I would
like to allow queries for person_name to be aliased as person_name,
person_first_name and person_last_name.  Is this allowed or does the
alias need to not appear in the list of fields to be aliased to (I
remember seeing something about aliases to other aliases is allowed)?
I could obviously create a purely virtual field which aliases all 3
but it would be nice if the parser could support this case.

Reply via email to