Hi Ivan,
thanks for your answer.
Why did your custom token filter did not work?
Unfortunately I don’t know why my tokenfilter doesn’t work. I tried to
implement a simple token filter (at the moment it is doing nothing at all),
just to try some logging. But it seems the token filter is not even called,
at least I don’t get any logging output.
I would pre-tokenize the text on the indexing side and create the field at
that point.
Which java-class or module do I need to do this pre-tokenization. Do I have
to use a AnalysisModule like this way?
public void onModule(AnalysisModule module) {
module.addProcessor(new WordCountAnalysisBinderProcessor());
}
And then create a TokenFilterFactory and the token filter, or is there
another way to implement a token filter?
Unfortunately I am really new to ES, so I have a few other questions.
I don’t know how to create a connection to my elasticsearch-server. Do I
have to use a Nodebuilder to get a Client, or is there another way to
connect with the server?
And how can I create a new field, to save my wordcount? Do I have to use a
XContentBuilder or is there another way?
Thanks for help!
Best regards,
Isabella
Am Freitag, 25. Oktober 2013 19:05:18 UTC+2 schrieb Ivan Brusic:
Why did your custom token filter did not work?
An analyzer applies token filters to each term returned by the tokenizer.
Many token filters will expand the number of tokens, such as the ngram and
synonym token filters. Make sure if you want to count the tokens before or
after the other token filters. That said, an analyzer works on a single
field and you want to create a new field. I would pre-tokenize the text on
the indexing side and create the field at that point.
Cheers,
Ivan
On Thu, Oct 24, 2013 at 9:32 AM, Isabella <isi.h...@gmail.com<javascript:>
wrote:
Thanks for your answer.
Is there maybe a tutorial how to write such a tokenfilter?
And how can I add a field to a document?
Am Donnerstag, 24. Oktober 2013 14:53:34 UTC+2 schrieb Nikolas Everett:
I'm working on this in and off and should have something in ES for it in
the next few weeks. If you search for 'term count' in the github issues you
should find it.
Sent from my iPhone
On Oct 24, 2013, at 5:12 AM, Isabella isi.h...@gmail.com wrote:
Hi.
I am new to ES and I have to write a simple plugin, which should count
all words in all documents, that are indexed. This word count should then
added in a new field to the document. The jdbc-river-plugin synchronizes my
database with elasticsearch. My documents look like this:
"text": "Text to analyze"
So I only have one field with a text. Afterwards it should look like this:
"text": "text to analyze"
"wordcount":"3"
I have already tried to write a tokenfilter to count the words of my
field "text", but unfortunately that didn't work.
How can elasticsearch recognize, that new documents are indexed and how
can I add a new field “wordcount” to the document?
Thanks for help!
--
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.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Am Freitag, 25. Oktober 2013 19:05:18 UTC+2 schrieb Ivan Brusic:
Why did your custom token filter did not work?
An analyzer applies token filters to each term returned by the tokenizer.
Many token filters will expand the number of tokens, such as the ngram and
synonym token filters. Make sure if you want to count the tokens before or
after the other token filters. That said, an analyzer works on a single
field and you want to create a new field. I would pre-tokenize the text on
the indexing side and create the field at that point.
Cheers,
Ivan
On Thu, Oct 24, 2013 at 9:32 AM, Isabella <isi.h...@gmail.com<javascript:>
wrote:
Thanks for your answer.
Is there maybe a tutorial how to write such a tokenfilter?
And how can I add a field to a document?
Am Donnerstag, 24. Oktober 2013 14:53:34 UTC+2 schrieb Nikolas Everett:
I'm working on this in and off and should have something in ES for it in
the next few weeks. If you search for 'term count' in the github issues you
should find it.
Sent from my iPhone
On Oct 24, 2013, at 5:12 AM, Isabella isi.h...@gmail.com wrote:
Hi.
I am new to ES and I have to write a simple plugin, which should count
all words in all documents, that are indexed. This word count should then
added in a new field to the document. The jdbc-river-plugin synchronizes my
database with elasticsearch. My documents look like this:
"text": "Text to analyze"
So I only have one field with a text. Afterwards it should look like this:
"text": "text to analyze"
"wordcount":"3"
I have already tried to write a tokenfilter to count the words of my
field "text", but unfortunately that didn't work.
How can elasticsearch recognize, that new documents are indexed and how
can I add a new field “wordcount” to the document?
Thanks for help!
--
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.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Am Freitag, 25. Oktober 2013 19:05:18 UTC+2 schrieb Ivan Brusic:
Why did your custom token filter did not work?
An analyzer applies token filters to each term returned by the tokenizer.
Many token filters will expand the number of tokens, such as the ngram and
synonym token filters. Make sure if you want to count the tokens before or
after the other token filters. That said, an analyzer works on a single
field and you want to create a new field. I would pre-tokenize the text on
the indexing side and create the field at that point.
Cheers,
Ivan
On Thu, Oct 24, 2013 at 9:32 AM, Isabella <isi.h...@gmail.com<javascript:>
wrote:
Thanks for your answer.
Is there maybe a tutorial how to write such a tokenfilter?
And how can I add a field to a document?
Am Donnerstag, 24. Oktober 2013 14:53:34 UTC+2 schrieb Nikolas Everett:
I'm working on this in and off and should have something in ES for it in
the next few weeks. If you search for 'term count' in the github issues you
should find it.
Sent from my iPhone
On Oct 24, 2013, at 5:12 AM, Isabella isi.h...@gmail.com wrote:
Hi.
I am new to ES and I have to write a simple plugin, which should count
all words in all documents, that are indexed. This word count should then
added in a new field to the document. The jdbc-river-plugin synchronizes my
database with elasticsearch. My documents look like this:
"text": "Text to analyze"
So I only have one field with a text. Afterwards it should look like this:
"text": "text to analyze"
"wordcount":"3"
I have already tried to write a tokenfilter to count the words of my
field "text", but unfortunately that didn't work.
How can elasticsearch recognize, that new documents are indexed and how
can I add a new field “wordcount” to the document?
Thanks for help!
--
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.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Am Freitag, 25. Oktober 2013 19:05:18 UTC+2 schrieb Ivan Brusic:
Why did your custom token filter did not work?
An analyzer applies token filters to each term returned by the tokenizer.
Many token filters will expand the number of tokens, such as the ngram and
synonym token filters. Make sure if you want to count the tokens before or
after the other token filters. That said, an analyzer works on a single
field and you want to create a new field. I would pre-tokenize the text on
the indexing side and create the field at that point.
Cheers,
Ivan
On Thu, Oct 24, 2013 at 9:32 AM, Isabella <isi.h...@gmail.com<javascript:>
wrote:
Thanks for your answer.
Is there maybe a tutorial how to write such a tokenfilter?
And how can I add a field to a document?
Am Donnerstag, 24. Oktober 2013 14:53:34 UTC+2 schrieb Nikolas Everett:
I'm working on this in and off and should have something in ES for it in
the next few weeks. If you search for 'term count' in the github issues you
should find it.
Sent from my iPhone
On Oct 24, 2013, at 5:12 AM, Isabella isi.h...@gmail.com wrote:
Hi.
I am new to ES and I have to write a simple plugin, which should count
all words in all documents, that are indexed. This word count should then
added in a new field to the document. The jdbc-river-plugin synchronizes my
database with elasticsearch. My documents look like this:
"text": "Text to analyze"
So I only have one field with a text. Afterwards it should look like this:
"text": "text to analyze"
"wordcount":"3"
I have already tried to write a tokenfilter to count the words of my
field "text", but unfortunately that didn't work.
How can elasticsearch recognize, that new documents are indexed and how
can I add a new field “wordcount” to the document?
Thanks for help!
--
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.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
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.
For more options, visit https://groups.google.com/groups/opt_out.