ruby on rails - How to print out the inverted index created by elasticsearch? -
If I wanted to get all the tokens of the index which creates elastic search (I'm using it), I How about going about this? Doing such a thing only creates a specific set of tokens for a search term:
curl -XGET 'http: // localhost: 9200 / development_test / _analyze? Text = John Smith '
You can add environments in the inverted index "Elastomer / client" requires "client" = Elastomer :: Client.Nue ({: url = & Gt; "http: // localhost: 9200"} index = "someindex" type = "sometype" field = "somefield" word = set.New client. scan (zero, index = & gt; index, type = & gt; type) .each_document do | document | Term_vectors = client.index (index) .docs (type) .termvector ({: fields = & gt; field ,: id = & gt; document ["_ id"]}) ["term_vectors"] if term_vectors.key? (Field) Term_vectors [field] ["Terms"] Key. Words | Until terms.include? (Term) terms & lt; & Lt; The word is slow and useless because it requests a _termvectors HTTP request for each document in the index, holds all the terms given in the RAM, and a scroll reference open for the duration of the calculation keeps. However, there are no other tools like Luke and they can be excluded from the index.
Comments
Post a Comment