Negation Search Not Working

Negation Search Not Working

dkercherdkercher Posts: 11Questions: 3Answers: 0
edited March 15 in Free community support

https://datatables.net/examples/basic_init/zero_configuration.html

The Search manual (https://datatables.net/manual/search) says: "Negative search matching using a dash before a word (e.g. -Click will find all data that does not contain the word "click")."

However, I can't get this working. My test case is just the zero_config page above. Searching Tokyo works, but seaching -Tokyo returns 0 results. Am I misunderstanding something? I tried with regex search enabled and couldn't get anything working there. My client's want exclusion search and multiterm search (ie. term1 || term2) and I can't seem to figure out either. Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Sorry - the doc is wrong. The negation character is !. Use !Tokyo.

    I'll commit that change to the docs right now!

    Allan

  • dkercherdkercher Posts: 11Questions: 3Answers: 0

    Thanks! Looks like I'll need to upgrade from 1.13 to use it, but works now.

Sign In or Register to comment.