Forums / Extensions / eZ Find / Multiple index methods for the same field type

Multiple index methods for the same field type

Author Message

Kostas Str.

Thursday 28 April 2011 11:06:29 am

Hello everybody,

which steps are necessary if I want to index for example a text field named 'title' whith multiple methods?

I use for facetting string and for searching text(defined in ezfind.ini). As a result I can use the fields attr_title_t and attr_title_s. Now I want the field to be additionaly indexed as text_ws from the schema.xml, where only whitespace-tokenizing is done.

Thanks.

Paul Borgermans

Friday 29 April 2011 2:32:40 pm

Hello Kostas

Welcome to the community :)

A quick way to do so is to define a new field and copy field construct in schema.xml.

<field name="attr_title_ws" type="text_ws" indexed="true" stored="false"  multiValued="true"/>
 
....


<copyField source="*attr_title_t" dest="attr_title_ws"/>

After this reatrt Solr and re-index.

Then you can use the raw field definition "attr_title_ws" in "raw" fieldnames for filtering, sorting, faceting or searching.

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans