It looks like my user interface returns a word count and it was sneakily
implemented by faulting text in from the database and running
str_word_count on it. I'd rather have elasticsearch calculate the number
of words in my text so I don't have to load to show search results. Does
anyone know a good way to do that? I assume it'd make more sense to store
the word count on index into another field and just fetch it.
can you go a bit more into detail here? are you asking for the frequency of
a word across the entire index or within a document? How do you need to
select words?
simon
On Thursday, October 10, 2013 11:52:04 PM UTC+2, Nikolas Everett wrote:
It looks like my user interface returns a word count and it was sneakily
implemented by faulting text in from the database and running
str_word_count on it. I'd rather have elasticsearch calculate the number
of words in my text so I don't have to load to show search results. Does
anyone know a good way to do that? I assume it'd make more sense to store
the word count on index into another field and just fetch it.
Just the number of terms in some field in the document. It is is a field I both query and highlight. I'd be happy with something approximate. I saw today I might be able to do a bit of math on the field norm to get it.
can you go a bit more into detail here? are you asking for the frequency of a word across the entire index or within a document? How do you need to select words?
simon
On Thursday, October 10, 2013 11:52:04 PM UTC+2, Nikolas Everett wrote:
It looks like my user interface returns a word count and it was sneakily implemented by faulting text in from the database and running str_word_count on it. I'd rather have elasticsearch calculate the number of words in my text so I don't have to load to show search results. Does anyone know a good way to do that? I assume it'd make more sense to store the word count on index into another field and just fetch it.
the field norm might help but it's hard to access and it's a 8bit float
value that includes the boosts so it might be quite lossy? What you could
do in master is using a TermVector and consume the field in the client
since it contains all terms for a field in a document.
On Friday, October 11, 2013 11:25:54 PM UTC+2, Nikolas Everett wrote:
Just the number of terms in some field in the document. It is is a field I
both query and highlight. I'd be happy with something approximate. I saw
today I might be able to do a bit of math on the field norm to get it.
can you go a bit more into detail here? are you asking for the frequency
of a word across the entire index or within a document? How do you need to
select words?
simon
On Thursday, October 10, 2013 11:52:04 PM UTC+2, Nikolas Everett wrote:
It looks like my user interface returns a word count and it was sneakily
implemented by faulting text in from the database and running
str_word_count on it. I'd rather have elasticsearch calculate the number
of words in my text so I don't have to load to show search results. Does
anyone know a good way to do that? I assume it'd make more sense to store
the word count on index into another field and just fetch it.
Nik
--
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.