Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Blur, mail # dev - Custom EdgeNGram Analyzer For Blur Text Field


Copy link to this message
-
Re: Custom EdgeNGram Analyzer For Blur Text Field
Aaron McCurry 2014-05-14, 02:03
Garrett is correct that you can create a custom type.  However you are
correct in that you can specify the "analyzerClass" property if and only if
there are one of two different types of constructors.  The default
constructor (no args) or one that takes the LuceneVersion enum.  Otherwise
it will throw an exception.  This also assumes that you are running a
fairly recent version of Blur if it's 0.2.2 (which I think you are) then
you are likely good to use that option.

Here's the code:

https://git-wip-us.apache.org/repos/asf?p=incubator-blur.git;a=blob;f=blur-query/src/main/java/org/apache/blur/analysis/type/TextFieldTypeDefinition.java;h=049207bdb4f94cf03a4b0c74891eba129d13fbbb;hb=3967e154e7b064ad40b36d1d5832b7c7bcac44cd#l69

Perhaps the reason it's not being taken is because the field has already
been defined for the given table?

If none of those possibilities are the problem I'm not sure what the
problem could be.  Let us know how it goes.

Aaron
On Tue, May 13, 2014 at 12:12 PM, Garrett Barton
<[EMAIL PROTECTED]>wrote: