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

Hoss Man commented on SOLR-2113:
--------------------------------

Currently, the best choices for dealing with this type of situation (generating 
filter queries from facet selectsion) are either "RawQParser" or "FieldQParser"

 * raw - works well for strings and text, but because it expects the input to 
be the completley raw term value, it doesn't work for FieldTypes that use 
encoding in their toInternal/toExternal methods (ie: SortableIntField, 
TrieIntField, etc...)
 * field - handles the toInternal problem (by delegating to 
FieldType.getFieldQuery()) but in the case of TextField this results in 
analysis being used on the input first -- if the analyzer configured isn't 
idempotent (love learning new words from yonik) this can also cause a problem 
(this situation may not be common, but it can be easy to get into w/o knowing 
it depending on how charfilters / stemmers are used)

Hence the desire for a new QParser ("term" seems like an appropriate name) that 
can be used like the "field" or "raw" QParsers (take a field name as a 
localParam) and is essentially implemented as...

{code}
return new TermQuery(new Term(fieldName, 
getSchema().getField(fieldName).getType().toInternal(q)))
{code}

> Create TermsQParser that deals with toInternal() conversion of external terms
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2113
>                 URL: https://issues.apache.org/jira/browse/SOLR-2113
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Hoss Man
>
> For converting facet.field response constraints into filter queries, it would 
> be helpful to have a QParser that generated a TermQuery using the 
> toInternal() converted result of the raw "q" param

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to