[
https://issues.apache.org/jira/browse/SOLR-5594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876553#comment-13876553
]
Hoss Man commented on SOLR-5594:
--------------------------------
bq. Why are any of the changes in SimpleQParser necessary, except for changing
new PrefixQuery(...) to sf.getType().getPrefixQuery()? It looks like all the
other changes there are unnecessary structural changes. Since the IndexSchema
is already available, it should be just a couple lines changed (180/183).
This confused me too ... but the structural changes are necessary in order to
pass the QParser down to the FieldType's method for the context of what is
being parsed -- with both the QParser and the SimpleQueryParser instances being
anonymous subclasses, it's not possible at the moment.
(I don't remember if the QParser context is used at the moment in any of the
new FieldType.newPrefixQuery impls, but that either way that param should exist
in case FieldType subclasses want to take advantage of it)
> Enable using extended field types with prefix queries for non-default encoded
> strings
> -------------------------------------------------------------------------------------
>
> Key: SOLR-5594
> URL: https://issues.apache.org/jira/browse/SOLR-5594
> Project: Solr
> Issue Type: Improvement
> Components: query parsers, Schema and Analysis
> Affects Versions: 4.6
> Reporter: Anshum Gupta
> Assignee: Anshum Gupta
> Priority: Minor
> Attachments: SOLR-5594-branch_4x.patch, SOLR-5594.patch,
> SOLR-5594.patch, SOLR-5594.patch, SOLR-5594.patch
>
>
> Enable users to be able to use prefix query with custom field types with
> non-default encoding/decoding for queries more easily. e.g. having a custom
> field work with base64 encoded query strings.
> Currently, the workaround for it is to have the override at getRewriteMethod
> level. Perhaps having the prefixQuery also use the calling FieldType's
> readableToIndexed method would work better.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]