Charfilter support in analysis api

Hi,

I am building a plugin for elasticsearch and I am using the java api to to
send an analysis request. The AnalysisRequestBuilder class doesn't support
specifying the char filters unlike the tokenizer or the token filters. The
same thing also is true for the rest API too. Is there any plan to add this
feature?

Since I am writing a plugin that actually is deployed on the same JVM with
elasticsearch, is there a workaround that I can use? For instance, can I
inject an instance of CharFilterFactory into my code for a char filter that
is defined in my settings?

Thanks,

Erdinç

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9a78e66a-9302-4707-9acd-2c6cd73ab1af%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Since your code is running as the same JVM as Elasticsearch, you have a few
more options. Depending on your use case, you can bypass the analysis API
and use the analyzers directly. Look at the test code in the analysis
package, in particular the AnalysisModuleTests class. The key is building
the AnalysisService

https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java

As far as your initial request, I am not sure why AnalyzeRequest does not
support char filters. The underlying TransportAnalyzeAction class could
support them.

Cheers,

Ivan

On Mon, Feb 17, 2014 at 12:24 PM, Erdinc Yilmazel
erdincyilmazel@gmail.comwrote:

Hi,

I am building a plugin for elasticsearch and I am using the java api to to
send an analysis request. The AnalysisRequestBuilder class doesn't support
specifying the char filters unlike the tokenizer or the token filters. The
same thing also is true for the rest API too. Is there any plan to add this
feature?

Since I am writing a plugin that actually is deployed on the same JVM with
elasticsearch, is there a workaround that I can use? For instance, can I
inject an instance of CharFilterFactory into my code for a char filter that
is defined in my settings?

Thanks,

Erdinç

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/9a78e66a-9302-4707-9acd-2c6cd73ab1af%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC1LWm7f7J1foFkZH7X1A%2BxLGUghTrnbhu1kjzU02h9Ww%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

The change seemed simple, so I went ahead and implemented it:

The tricky part is getting the Elasticsearch team to notice. :slight_smile:

--
Ivan

On Mon, Feb 17, 2014 at 2:13 PM, Ivan Brusic ivan@brusic.com wrote:

Since your code is running as the same JVM as Elasticsearch, you have a
few more options. Depending on your use case, you can bypass the analysis
API and use the analyzers directly. Look at the test code in the analysis
package, in particular the AnalysisModuleTests class. The key is building
the AnalysisService

https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java

As far as your initial request, I am not sure why AnalyzeRequest does not
support char filters. The underlying TransportAnalyzeAction class could
support them.

Cheers,

Ivan

On Mon, Feb 17, 2014 at 12:24 PM, Erdinc Yilmazel <
erdincyilmazel@gmail.com> wrote:

Hi,

I am building a plugin for elasticsearch and I am using the java api to
to send an analysis request. The AnalysisRequestBuilder class doesn't
support specifying the char filters unlike the tokenizer or the token
filters. The same thing also is true for the rest API too. Is there any
plan to add this feature?

Since I am writing a plugin that actually is deployed on the same JVM
with elasticsearch, is there a workaround that I can use? For instance, can
I inject an instance of CharFilterFactory into my code for a char filter
that is defined in my settings?

Thanks,

Erdinç

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/9a78e66a-9302-4707-9acd-2c6cd73ab1af%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCqPYoVmJ5YBM2EgPN3iF6f-%3DtgGYzZ0EcJLtco2xSTdw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Great! Thanks a lot Ivan.

On Monday, February 17, 2014 11:32:46 PM UTC-5, Ivan Brusic wrote:

The change seemed simple, so I went ahead and implemented it:
Add support for char filters in the analyze API by brusic · Pull Request #5148 · elastic/elasticsearch · GitHub

The tricky part is getting the Elasticsearch team to notice. :slight_smile:

--
Ivan

On Mon, Feb 17, 2014 at 2:13 PM, Ivan Brusic <iv...@brusic.com<javascript:>

wrote:

Since your code is running as the same JVM as Elasticsearch, you have a
few more options. Depending on your use case, you can bypass the analysis
API and use the analyzers directly. Look at the test code in the analysis
package, in particular the AnalysisModuleTests class. The key is building
the AnalysisService

https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java

As far as your initial request, I am not sure why AnalyzeRequest does not
support char filters. The underlying TransportAnalyzeAction class could
support them.

Cheers,

Ivan

On Mon, Feb 17, 2014 at 12:24 PM, Erdinc Yilmazel <erdincy...@gmail.com<javascript:>

wrote:

Hi,

I am building a plugin for elasticsearch and I am using the java api to
to send an analysis request. The AnalysisRequestBuilder class doesn't
support specifying the char filters unlike the tokenizer or the token
filters. The same thing also is true for the rest API too. Is there any
plan to add this feature?

Since I am writing a plugin that actually is deployed on the same JVM
with elasticsearch, is there a workaround that I can use? For instance, can
I inject an instance of CharFilterFactory into my code for a char filter
that is defined in my settings?

Thanks,

Erdinç

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/9a78e66a-9302-4707-9acd-2c6cd73ab1af%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/eb0f6b29-0511-49cd-958a-0ab9d5de0b83%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.