I detailed using a JavaScript update processor to run code through (the 
KeepWordFilter too) analysis and setting the stored field values to the 
extracted tokens here:

        http://www.slideshare.net/erikhatcher/solr-indexing-and-analysis-tricks 
<http://www.slideshare.net/erikhatcher/solr-indexing-and-analysis-tricks>


—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com <http://www.lucidworks.com/>




> On Jun 12, 2015, at 3:04 AM, Upayavira <u...@odoko.co.uk> wrote:
> 
> Facets use indexed terms, search results return stored terms before
> analysis. If you want to *store* the results of analysis, then you'll
> need to do it in an analysis chain. I do recall Chris Hosstetter
> (Hossman) giving a presentation about how to do this, but I don't recall
> where that was :-( Hopefully he is listening.
> 
> Upayavira
> 
> On Fri, Jun 12, 2015, at 07:25 AM, vineet yadav wrote:
>> Hi,
>> 
>> I am using keepword filter to identify key phrases. I have made following
>> schema changes in schema.xml
>> 
>> <!--added field -->
>> <field name="keyphrase_words" type="keyphraseType" stored="true"
>> indexed="true" multiValued="true"/>
>> 
>> <!--Added copy filed-->
>> <copyField source="content" dest="keyphrase_words"/>
>> 
>> <!--Defined keep phrase field type-->
>> <fieldType name="keyphraseType" class="solr.TextField" >
>>         <analyzer type="index">
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.KeepWordFilterFactory" words="keypharse.txt"
>> ignoreCase="true"/>
>>        </analyzer>
>>        <analyzer type="query">
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.KeepWordFilterFactory" words="keypharse.txt"
>> ignoreCase="true"/>
>>        </analyzer>
>>            </fieldType>
>> 
>> When I am using facet query on keyphrase field(
>> http://localhost:8983/solr/core1/select?q=*%3A*&wt=json&indent=true&facet=true&facet.field=keyphrase_words)
>> , I am getting only filtered words. But When I use solr general query
>> 
>> http://localhost:8983/solr/core1/select?q=*%3A*&wt=json&indent=true,
>> 
>> Both content field and keyphrase field has same content.
>> I want to get only filter words in solr general query
>> http://localhost:8983/solr/core1/select?q=*%3A*&wt=json&indent=true. Can
>> you please tell me how can I achieve this requirement.

Reply via email to