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

Yonik Seeley edited comment on SOLR-8160 at 10/13/15 3:31 PM:
--------------------------------------------------------------

It feels like some amount of transformations to go from readable to indexed 
should generally applied.
This is already done for most field types: for example numerics work:
{code}
http://localhost:8983/solr/techproducts/query?q={!terms f=popularity}8,9,10
{code}

I remember we did something similar for things like prefix queries... 
selectively applying what made sense (i.e. lowercasing made sense, but stemming 
did not).

All in all though, I think the current behavior is probably fine for the use 
cases the terms parser is meant for.  A normal query can be used for more 
complete text analysis.


was (Author: ysee...@gmail.com):
It feels like some amount of transformations to go from readable to indexed 
should generally applied.
This is already done for most field types: for example numerics work:
{code}
http://localhost:8983/solr/techproducts/query?q={!terms f=popularity}8,9,10
{code}

I remember we did something similar for things like prefix queries... 
selectively applying what made sense (i.e. lowercasing made sense, but stemming 
did not).

> Terms query parser should optionally do query analysis 
> -------------------------------------------------------
>
>                 Key: SOLR-8160
>                 URL: https://issues.apache.org/jira/browse/SOLR-8160
>             Project: Solr
>          Issue Type: Improvement
>          Components: query parsers, search
>    Affects Versions: 5.3
>            Reporter: Devansh Dhutia
>
> Field setup as
> {code}
> <field name="cs" type="string_ci" indexed="true" stored="true" 
> multiValued="false" required="false" />
>    <fieldType name="string_ci" class="solr.TextField" sortMissingLast="true">
>       <analyzer type="index">
>          <tokenizer class="solr.KeywordTokenizerFactory" />
>          <filter class="solr.LowerCaseFilterFactory" />
>       </analyzer>
>       <analyzer type="query">
>          <tokenizer class="solr.KeywordTokenizerFactory" />
>          <filter class="solr.LowerCaseFilterFactory" />
>       </analyzer>
>    </fieldType>
> {code}
> Value sent to cs field for indexing include: AA, BB
> Following is observed
> {code}&fq={!terms f=cs}AA,BB{code} yields 0 results
> {code}&fq={!terms f=cs}aa,bb{code} yields 2 results
> {code}&fq=cs:(AA BB){code} yields 2 results
> {code}&fq=cs:(aa bb){code} yields 2 results
> The first variant above should behave like the other 3 & obey query time 
> analysis



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to