Forgive what might seem like a newbie question but am struggling desperately
with this. 

We have a dynamic field that holds email address and we'd like to be able to
sort by it, obviously when trying to do this we get an error as it thinks
the email address is a tokenized field. We've tried a custom field type
using PatternReplaceFilterFactory to specify that @ and . should be replaced
with " AT " and " DOT " but we just can't seem to get it to work, all the
field still contain the unparsed email.

We used an example found on the mailing-list for the field type:

    <fieldType name="email" class="solr.TextField"
positionIncrementGap="100">
      <analyzer>
       <tokenizer class="solr.StandardTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.PatternReplaceFilterFactory" pattern="\."
replacement=" DOT " replace="all" />
       <filter class="solr.PatternReplaceFilterFactory" pattern="@"
replacement=" AT " replace="all" />
       <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnCaseChange="0"/>
      </analyzer>
    </fieldType>

.. our dynamic field looks like ..

  <dynamicField name="dynamicemail_*"  type="email"  indexed="true"
stored="true"  multiValued="true" />

When writing a document to Solr it still seems to write the original email
address (e.g. this.u...@somewhere.com) opposed to its parsed version (e.g.
this DOT user AT somewhere DOT com). Can anyone help? 

We are running version 1.4 but have even tried the nightly build in an
attempt to solve this problem.

Thanks.

Reply via email to