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 .
Ivan
(Ivan Brusic)
January 28, 2014, 5:11pm
2
Correct, create a plugin. Take a look at some of the existing analysis
plugins as a template:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
--
Ivan
On Tue, Jan 28, 2014 at 8:48 AM, Guilhem Legal
guilhem.legal@geomatys.com wrote:
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 .
jprante
(Jörg Prante)
January 28, 2014, 5:40pm
3
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 .
Ivan
(Ivan Brusic)
January 28, 2014, 6:39pm
4
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.
opened 10:04PM - 04 Jun 10 UTC
closed 10:07PM - 04 Jun 10 UTC
>enhancement
v0.09.0
Within a plugin, allow to more easily plug in a custom `XContentQueryParser` and… `XContentFilterParser`. It follows the same model as the analysis extension module, and should look something like this:
```
public class Customlugin extends AbstractPlugin {
@Override public String name() {
return "custom";
}
@Override public String description() {
return "My custom plugin";
}
@Override public void processModule(Module module) {
if (module instanceof IndexQueryParserModule) {
IndexQueryParserModule queryParserModule = (IndexQueryParserModule) module;
queryParserModule.addProcessor(new IndexQueryParserModule.QueryParsersProcessor() {
@Override public void processXContentQueryParsers(XContentQueryParsersBindings bindings) {
bindings.processXContentQueryParser("my_name", MyNameQueryParser.class);
}
});
}
}
}
```
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 .