Add a custom lucene search filter to elasticsearch

Hi!

i'm trying to migrate my java application from Lucene to Elasticsearch.

I have a custom java filter (extending org.apache.lucene.search.Filter)
that i like to include in elasticSearch.

How can i do that? with a plugin ?

Guilhem Legal

--
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/2243c8a6-ba15-43b5-9651-297ade39d73f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Correct, create a plugin. Take a look at some of the existing analysis
plugins as a template:

--
Ivan

On Tue, Jan 28, 2014 at 8:48 AM, Guilhem Legal
guilhem.legal@geomatys.comwrote:

Hi!

i'm trying to migrate my java application from Lucene to Elasticsearch.

I have a custom java filter (extending org.apache.lucene.search.Filter)
that i like to include in elasticSearch.

How can i do that? with a plugin ?

Guilhem Legal

--
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/2243c8a6-ba15-43b5-9651-297ade39d73f%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%3DcQDFyy0sacOh8OmuBh9b%2BDAueRrfsL_9mb%2Bx71LfZxHEKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Adding a Lucene filter via a plugin is possible, but a bit more demanding,
you have to tweak the IndexQueryParserService like it is demonstrated in
org.elasticsearch.index.query.guice.IndexQueryParserModuleTests

Jörg

--
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/CAKdsXoGA9d4t2h5RSbKbXuY4oJnwVQkW_TYFpvc%3DT3Cgo0Cf%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jörg, what is the purpose of tweaking the IndexQueryParserService? I have a
few custom filters, and all I do is add them via
tokenFiltersBindings.processTokenFilter()
or analysisModule.addTokenFilter().

--
Ivan

On Tue, Jan 28, 2014 at 9:40 AM, joergprante@gmail.com <
joergprante@gmail.com> wrote:

Adding a Lucene filter via a plugin is possible, but a bit more demanding,
you have to tweak the IndexQueryParserService like it is demonstrated in
org.elasticsearch.index.query.guice.IndexQueryParserModuleTests

Jörg

--
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/CAKdsXoGA9d4t2h5RSbKbXuY4oJnwVQkW_TYFpvc%3DT3Cgo0Cf%2Bw%40mail.gmail.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%3DcQCqPcUeJU9y3axf8SC-baAdWVu6bBUqT-%2B%2Bu%3DrbwtjSEg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you,

i found an easy way to incoporate my filters to ES in a plugin.

Guilhem Legal

Le mardi 28 janvier 2014 19:39:23 UTC+1, Ivan Brusic a écrit :

Jörg, what is the purpose of tweaking the IndexQueryParserService? I have
a few custom filters, and all I do is add them via tokenFiltersBindings.processTokenFilter()
or analysisModule.addTokenFilter().

--
Ivan

On Tue, Jan 28, 2014 at 9:40 AM, joerg...@gmail.com <javascript:> <
joerg...@gmail.com <javascript:>> wrote:

Adding a Lucene filter via a plugin is possible, but a bit more
demanding, you have to tweak the IndexQueryParserService like it is
demonstrated in
org.elasticsearch.index.query.guice.IndexQueryParserModuleTests

Jörg

--
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/CAKdsXoGA9d4t2h5RSbKbXuY4oJnwVQkW_TYFpvc%3DT3Cgo0Cf%2Bw%40mail.gmail.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/d325b3e2-c100-454f-a5e9-8578217e9de3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.