From 3195490f514b4e9f35466b53c504745a66329190 Mon Sep 17 00:00:00 2001
From: SandyDatatables
This plug-in adds fuzzy search functionality to DataTables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This plug-in adds fuzzy search functionality to Datatables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This example demonstrates the use of the fuzzySearch.rankColumn
initialisation option. The default value for this option is undefined which will lead to the
similarity not being displayed in any column. In this example fuzzySearch.rankColumn
is set to 6
which is the column on the far right of
@@ -631,13 +630,11 @@ $(document).ready(function() {
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
- $(document).ready(function() {
var table = $('#example').DataTable({
fuzzySearch: {
rankColumn: 6
}
});
- } );
} );
diff --git a/features/fuzzySearch/returnSearch.html b/features/fuzzySearch/returnSearch.html
index c2f3a06..b51ed7c 100644
--- a/features/fuzzySearch/returnSearch.html
+++ b/features/fuzzySearch/returnSearch.html
@@ -55,9 +55,8 @@
$(document).ready(function() {
var table = $('#example').DataTable({
- fuzzySearch: {
- returnSearch: true
- }
+ fuzzySearch: true,
+ search:{return: true}
});
} );
@@ -73,7 +72,7 @@ $(document).ready(function() {
term. This allows spelling mistakes and typos to be accounted for. It also allows small changes in dialect not to affect search results. A commonly used example is
for surname searching. "Smith" and "Smythe" are pronounced the same way, but using conventional searching typing "Smith" would not return "Smythe".
This plug-in adds fuzzy search functionality to Datatables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This example demonstrates the use of the fuzzySearch.returnSearch
initialisation option. The default value for this option is undefined which lead to the search
- results being updated on every keypress. In this example fuzzySearch.returnSearch
is set to true
, meaning that the search results displayed within the table will
+
This example demonstrates how fuzzy searching can make use of the search.return
initialisation option which is new in DataTables version 1.11. The default value for this option is false which lead to the search
+ results being updated on every keypress. In this example search.return
is set to true
, meaning that the search results displayed within the table will
only be updated when the enter key is pressed.
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
- $(document).ready(function() {
var table = $('#example').DataTable({
- fuzzySearch: {
- returnSearch: true
- }
+ fuzzySearch: true,
+ search:{return: true}
});
- } );
} );
diff --git a/features/fuzzySearch/stateSaving.html b/features/fuzzySearch/stateSaving.html
index a98752d..3b05372 100644
--- a/features/fuzzySearch/stateSaving.html
+++ b/features/fuzzySearch/stateSaving.html
@@ -75,7 +75,7 @@ $(document).ready(function() {
term. This allows spelling mistakes and typos to be accounted for. It also allows small changes in dialect not to affect search results. A commonly used example is
for surname searching. "Smith" and "Smythe" are pronounced the same way, but using conventional searching typing "Smith" would not return "Smythe".
This plug-in adds fuzzy search functionality to Datatables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This example shows how fuzzySearch integrates with stateSave
. The search mode, the value within the search box and the search results are restored
as they were on reload. To display all of the stateSave
functionality, fuzzySearch.toggleSmart
and fuzzySearch.rankColumn
@@ -631,7 +630,6 @@ $(document).ready(function() {
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
- $(document).ready(function() {
var table = $('#example').DataTable({
fuzzySearch: {
rankColumn: 6,
@@ -639,7 +637,6 @@ $(document).ready(function() {
},
stateSave: true
});
- } );
} );
diff --git a/features/fuzzySearch/threshold.html b/features/fuzzySearch/threshold.html
index b3ed0fb..8b06c21 100644
--- a/features/fuzzySearch/threshold.html
+++ b/features/fuzzySearch/threshold.html
@@ -74,7 +74,7 @@ $(document).ready(function() {
term. This allows spelling mistakes and typos to be accounted for. It also allows small changes in dialect not to affect search results. A commonly used example is
for surname searching. "Smith" and "Smythe" are pronounced the same way, but using conventional searching typing "Smith" would not return "Smythe".
This plug-in adds fuzzy search functionality to Datatables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This example demonstrates the use of the fuzzySearch.threshold
initialisation option. The default value for this option is 0.5. This value is used to
compare against the Damerau-Levenshtein similarity metric which is calculated by dividing the number of changes needed to make the words the same, by the length of
diff --git a/features/fuzzySearch/toggleSmart.html b/features/fuzzySearch/toggleSmart.html
index 4dc86a7..0680b3a 100644
--- a/features/fuzzySearch/toggleSmart.html
+++ b/features/fuzzySearch/toggleSmart.html
@@ -74,7 +74,7 @@ $(document).ready(function() {
term. This allows spelling mistakes and typos to be accounted for. It also allows small changes in dialect not to affect search results. A commonly used example is
for surname searching. "Smith" and "Smythe" are pronounced the same way, but using conventional searching typing "Smith" would not return "Smythe".
This plug-in adds fuzzy search functionality to Datatables. It does this through a combination of exact matching and the Damerau-Levenshtein algorithm. There are four initialisation options that are associated with this + "https://github.com/tad-lispy/node-damerau-levenshtein">Damerau-Levenshtein algorithm. There are three initialisation options that are associated with this plugin.
fuzzySearch.toggleSmart
allows the searching to be changed from exact matching to fuzzy searching.fuzzySearch.threshold
allows the value of similarity that is required from the Damerau-Levenshtein function to display the row to be
changed.fuzzySearch.returnSearch
allows the option for searching to only occur when the enter key is pressed.This example demonstrates the use of the fuzzySearch.toggleSmart
initialisation option. The default value for this option is undefined which leads
to fuzzy searching being used all the time if the fuzzySearch
option is declared in the initialisation options. In this example fuzzySearch.toggleSmart