How do I exclude multiple terms in Kibana 4 - kibana

How can I exclude multiple search terms in Kibana 4? If I type in only one term, it excludes it...but how can I have more than one excluded term. For example, the term "not yet classified"

If I understand your question properly, you're trying to use the "Exclude Pattern" to exclude certain values from populating in the chart.
The "Exclude Pattern" and "Include Pattern" fields are for Regular Expressions and are documented here: http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html.
If you want to exclude multiple fields, you could do something like this:
term1|term2|term3

The query field in Kibana uses Lucene syntax which has some info at http://www.lucenetutorial.com/lucene-query-syntax.html.
To exclude a term containing specific text, use
-field: "text"
to exclude different texts, I use
-field: ("text1" or "text2")
If it's two separate fields, try
-field1: "text1" -field2: "text2"

in newer version of kibana if you want to exclude some term use this:
not field : "text"
if you want to exclude a phrase use this:
not field : "some text phrase"
you can use other logical operation with not:
field: "should have phrase" and not field: "excluded phrase"

https://www.elastic.co/guide/en/kibana/master/kuery-query.html
To match documents where response is 200 but extension is not php or css.
response:200 and not (extension:php or extension:css)

So in the query above the visualization, you can use Lucene syntax to exclude the hits, once saved this will perform the same as an attempt of using regex or Lucene syntax in the Exclude Field of the Buckets advanced options.

Related

Wildcard search not returning results for search terms containing single-quote ( ' ) character

We're using Google Cloud-Search and searching a particular datasource for "O'Conn*" doesn't returned any results.
...
"valueFilter": {
"operatorName": "lastname",
"value": {
"stringValue": "O'CONN*"
}
...
The field is set as wildcardsearchable:true and all the records were re-indexed after. The datasource contains over 40 records that should match. The wildcard search does work but not for any wildcard search terms that contains a single quote ('). Here's a few test I've done
"O'CONN*" - No match
"*CONN*" - Plenty of matches including "O'Connor"
"O'CONNOR" - Matches all "O'Connor" (not a wildcard search)
Would you know a way to perform the search? Do we need to escape the single quote in anyway?
I thought about replacing the single quote by another character, removing it or adding an alternative form of the term before indexing, but then we'd be opening a can of worm. Needing to process search terms before sending, detect and update before the field is displayed on our search result page, etc...
I found a post that likely explains why I'm experiencing this behaviour, but it's for Lucene search. I couldn't find a setting similar to the one described in that post in Google Cloud Search settings or documentation.
Thanks
I tried:
Escaping the single quote in different ways;
Putting the wild card character at different position to test different theories
I've search Google's documentation for "Cloud Search wildcard single quote", but no satisfactory results.

WP_Term_Query - How to search only beginning of term name?

I'm building a WordPress autocomplete search which uses custom taxonomy terms as suggestions, and I'm using WP_Term_Query to query for the terms from what the user types in the search field.
WP_Term_Query has a parameter called "search" which according to the documentation uses the search criteria to match terms and will be SQL-formatted with wildcards before and after. I would need it to only include the wildcard after, so that from the input "ad" it would match "Addaday" and "Adidas", but not "Diadora" or "Fitness Mad" for example. Is this possible to accomplish somehow?
Another approach would be to write a bit more code to weed out the results you don't want and keep just the ones you do. How that would look would depend on the code you already have, but preg_match() might get you on the right track.

Combined Fulltext Search API views filters that contains both all of these words filter and none of these words filter in Drupal

I have two exposed full text search API views filters that are used to filter the results returned from Apache Solr index. I want to give the user the ability to search text "containing all of these words" and "none of these words" and have used the respective views "Fulltext search" operators to achieve this. However, what is weird that whenever the none of these words filter is used, it increases the number of the returned search results instead of decreasing them and doesn't actually eliminate the results with the words mentioned.
Does this have to be done through search_api_query_alter?

multiple node reference formatted in drupal7

In my website, I have a section for documents. Those documents are available in different languages.
When I show those documents, I want to group them to have an input like that :
Document-001 [ENGLISH] [DUTCH] [CHINESE] [FRENCH]
... and when we click on "english" , it download the english version.
How can I do ?
Right now, I have a CCK named "documents" where I put files and description. I'm trying to use them to show it like the example above but I didn't found the way to.
I used the "Field collections" Module to set "Document" and "Language" fields.
With that implementaion, in every node, I can attach multiple documents and languages.

Comma Separated check in asp.net

How to search every word separated by comma in textbox
Please refer above post
Its Working perfectly...But i have small issues.. when i enter in text box like c,c++,4-5 yrs it have to check in database like either c,c++ skills and 4-5 yrs experiecne and then the reult has to be shown... Burt as per ur query it just show results whether any one of keyword satisfy database ...I want to compare year also how? –
If you want that behavior, you have to program that behavior. One design is to have multiple input boxes: one where you check if any of the words exist, another where you check that all of the words exist. (Perhaps even another for an exact phrase match.) Another design possibility would be for you to develop a syntax to indicate optional and required words all within a single input box. The point is it is up to you.
After you've decided on a design, then you could write code that builds your query based on or matches on the optional words and and matches on the required. Something like this pseudocode
Select * From Table Where
(Field Like OptionalWord1 Or Field Like OptionalWord2 Or Field Like OptionalWord3)
And Field Like RequiredWord1
And Field Like RequiredWord2
(etc.)

Resources