I want to search through my document to count the number of documents that contains specific word and other that does not have that specific word in kibana4.
can anyone help me about this?
Thanks
Use data table visualization
Use the filter agg type.
And give "NOT fieldName:missingValue" , to show the missing documents.
and "fieldName:value" , to show documents having the word.
Related
in my elasticsearch index all logs have a field called RES and the structure look like this :
Number:"12131", amount:8, referenceNumber:"140102129728883", expire:"1365", securityControl:0
I want to compare number in all indexed documents and delete duplicated documents.
can anybody help me?
there i tried searching query on index where the result should come by searching on the field . But the searching pattern should be like:
lets say i have 3 fields :A ,B,C .
so if the searched query matches on field A then return that value and don't perform search operation on other field B,C.
i tried using multi match and highlight feature to search but unable to get desired output...
So , if any one can help it will be great.
Thank you.
I have an index containing thousands of documents, each one of them having a full text field.
I want to search through all those fields and fetch the 10 most common words that come back most often.
I would also like a way of visualizing it on Kibana if that's possible.
The most common way to achieve that is to duplicate your full text field with a keyword datatype. That will get you able to make terms aggregation on that field - doc here. Maybe you could consider to do a significant term aggregation - doc here, thus to avoid the presence of stopwords and common words. In ES 6.x you could use also the significant text aggregation - doc here, without create the keyword field, but i never try it, i don't know how it works. Instead if you need to retrieve the frequency of the words for each document, you should use the termvector - doc here
I know how to enable them on my full text indexed table, but I don't know how to check if they are already enabled using an SQL command.
Can anyone shed some light on this?
Most of the fulltext-properties of a table can be queried by using the sys.fulltext_indexes dmv. In this case, stoplist_id should have the information you are looking for.
you could try inserting a document containing only stop words, and then query it (pseudoquery: id=xxx AND text contains "the") - if you get a result, stopwords are being indexed (no stoplist). Hacky, but it will work.
I have a Solr query where i am trying to sort the results based on a certain field.
I want to modify it in such a way that only a particular set of documents get sorted and the remaining are simply appended to the end of the sorted list.
Is there a way to achieve this?
Please help.
Regards.
If you want to Sort by a particular field condition which is dynamic, you can boost the field with matching condition higher and sort by score.
for e.g. bq=some_field:some_value^10
This will boost the scores of the documents only matching the criteria.
Also, for all the other documents the score would be unchanged and would follow the boasted documents as is.
EDIT :-
you can boost on multiple fields e.g. bq=string_array_field:some_value^10&bq=ranking^10 would boost the documents matching the value and the having higher ranking to the top.
The rest of the documents would follow.
For each <fieldType> definition in your schema.xml you can set a sortMissingLast="true" option that would give you the desired sorting behavior. For your specific example, I would recommend creating a new field with the sortMissingLast="true" set and use then populate this additional field based on your given criteria and not setting a value for those documents you want to appear at the end when sorted.