You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Eduard Moraru (JIRA)" <ji...@apache.org> on 2013/01/23 18:23:14 UTC

[jira] [Commented] (SOLR-3598) Provide option to allow aliased field to be included in query for EDisMax QParser

    [ https://issues.apache.org/jira/browse/SOLR-3598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560845#comment-13560845 ] 

Eduard Moraru commented on SOLR-3598:
-------------------------------------

Why so quick to dismiss this idea?

I have just discovered field aliasing and I think it's great. My scenario was basically to do query expansion for specific fields, but, just like the OP, I needed the actually expanded field to be kept in the resulting query, like "f.who.qf=who,what,where" (which currently causes a loop exception).

Now, applying the suggested workaround, I have to rename my field in the schema.xml to something that is semantically incoherent, only so that I can include that renamed field in my alias list, like: "f.who.qf=who_real,what,where"

I really think that having some field-based option that prevents further alias expansion would be great and would keep the schema.xml consistent.

WDYT?
                
> Provide option to allow aliased field to be included in query for EDisMax QParser
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3598
>                 URL: https://issues.apache.org/jira/browse/SOLR-3598
>             Project: Solr
>          Issue Type: New Feature
>          Components: query parsers
>    Affects Versions: 3.6, 4.0-ALPHA
>            Reporter: Jamie Johnson
>            Priority: Minor
>         Attachments: alias.patch
>
>
> I currently have a situation where I'd like the original field included in the query, for instance I have several fields with differing granularity, name, firstname and lastname.  Some of my sources differentiate between these so I can fill out firstname and lastname, while others don't and I need to just place this information in the name field.  When querying I'd like to be able to say name:Jamie and have it translated to name:Jamie first_name:Jamie last_name:Jamie.  In order to do this it creates an alias cycle and the EDisMax Query parser throws an exception about it.  Ideally there would be an option to include the original field as part of the query to support this use case.

--
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