solr - elasticsearch phraze term frequency .tf() containing multiple words -


I want to reach the frequency of combined frames with many words, e.g. "Green energy"

I can see an example of "green" and "energy". Example:

  "function_score": {"filter": {"terms": { "content": [ "energy", "green"]}}, "Skript_skor": { "script": "_index [ 'content'] [ 'energy']. TF () + _index [ 'content'] [ 'Green']. TF () "," lang ":" groovy "}}  

This works fine, however, how do I get the frequency of one word" green energy "

  _index ['content'] ['green energy'] Tf ()  

does not work

I think that it's your data, depending on the index and you who are looking for when C requirements, for example, if you have "insufficient indirect green energy" (meaning "green" and other "energy" Is close) and you want your script to "match" to "green energy" and give you a tf () evaluation so that you can see your data Direction must be guided by. As you said - the frequency of the word "green energy" blows down to produce the word "green energy" by any means.

In your case, consider one case using another area. > "Content to be done" but with "code" as "ring" analyzer:

  PUT / some_index {"setting": {"analysis": { "filters": { "my_shingle_filter": { "type": "shingle", "min_shingle_size": 2, "max_shingle_size": 2, "output_unigrams": false}}, "analyst": { "my_shingle_analyzer": {"Type": "custom" "tokenizer": "standard", "fill" Master ": [" lowercase "," my_shingle_filter "]}}}}," Mapping ": {" Some_type ": {" properties ": {" content ": {" type ":" string "," Index ":" analysis "," field ": {" with_shingsles ": {" type ":" string "," analyzer ":" my_shingl e_analyzer "}}}}}}}  

and its function In the score, you reference that .with_shingles area:

  {"query": {"function_score": {"filter": {"conditions": { "content": [ "energy", "green"]}}, "script_score": { "script": "_index [ 'content.with_shingles'] [ 'green energy'] tf ()", "Lang. ":" Groove "}}}}  

It proves that you need only to have an example to direct your data accordingly so that you do that .tf () . In my example, I have assumed that you want to search for the exact word "green energy", so I used "horn", as an example for the text, Results in an analysis list of words like this: "Content

:" for ur Be "," green energy "," indirect green "," additional "]

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -