custom search query
custom search query
Hi there, I have a question regarding customisation of a search query.
I would like to perform text processing instead of the default search query which I found on Youtube.
This is the original one I took from my MVC 5 project.
`<!-- Normal -->
<link href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet" />
@section scripts{
@* Normal *@
<script src="//cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function () {
var dataTableInstance = $("#equipmentTable").DataTable(
{
"ajax": {
"url": "/Equipment/GetList",
"type": "GET",
"datatype": "json"
},
searching: true,
"columns": [
{ "data": "EquipmentId" },
{ "data": "EquipmentDesc" },
{ "data": "Make" },
{ "data": "Model" },
{ "data": "ProtectionMethod" },
{ "data": "GasGroup" },
{ "data": "TempClass" },
{ "data": "IPVal" },
{ "data": "CertName" },
{ "data": "AmbientTemp" },
]
})
//search column
$('#equipmentTable thead th').each(function () {
var title = $('#equipmentTable tfoot th').eq($(this).index()).text();
$(this).html('<input type="text" placeholder="Search ' + title + '"/>')
});
dataTableInstance.columns().every(function () {
var datatableColumn = this;
var searchTextBoxes = $(this.header()).find('input');
searchTextBoxes.on('keyup change', function () {
datatableColumn.search(this.value).draw();
})
searchTextBoxes.on('click', function (e) {
e.stopPropagation();
})
});
});
</script>`
However, as mentioned before, I would like to use text processing technique to retrieve some information on the database, so that the text processing can make sense.
Before that, I have used stop words removal, porter stemming and jaccard similarity on c# console. I would like to port those techniques and apply those here. Is there any way I can do some customisations on search query? Many thanks