Coder Social home page Coder Social logo

auto-advanced-search's Introduction

auto-advanced-search

Test Status

Auto-advanced-search is a module to prepare strings to perform match against in boolean mode modifier in mysql, that handles relevences of the required words for the query.

Installation:

npm i --save auto-advanced-search

Example:

// Require dependencies
var aas = require( 'auto-advanced-search' );

// Do the filtering
var string = 'something that i want to find',

// Call function with the required query
var query = aas( string );

// Returned result
	// query - returns '+something +that +want +find*'

Explanation:

The first string is always returned because, in this way, while the user is typing the word is going to appear some results. The next words will be filtered if it have three characters or less because in most cases this words doesn't have much relevance in the searching. In the last word have a "", like the sql wildcard "%", for the next characters match. The response will return the string with a plus "+" and in the last word have a "", like the sql "LIKE" wildcard "%", ex.'+string*' or '+first +second*' for the in boolean mode modifier assigns the relevance to the query.

Find with hit, and give their relevance with auto-advanced-search for better searches!

auto-advanced-search's People

Contributors

brunocasanova avatar

Stargazers

typelogical avatar Valentin Vichnal avatar Angus H. avatar Rafael Campos Nunes avatar José Moreira avatar Fabricio Konell avatar D avatar Pathirana avatar Emmanuel Salomon avatar Gabriel Conceição avatar Fernando Neto avatar  avatar

Watchers

James Cloos avatar José Moreira avatar  avatar

Forkers

brunocasanova

auto-advanced-search's Issues

remove unsecure chars from aas query

  aas
    ✓ should not break with " 
    ✓ should not break with ' 
    ✓ should not break with ; 
    ✓ should not break with ( 
    ✓ should not break with ) 
    ✓ should not break with () 
    ✓ should not break with ! 
    ✓ should not break with ? 
    ✓ should not break with : 
    ✓ should not break with - 
    ✓ should not break with _ 
    ✓ should not break with ` 
    ✓ should not break with ´ 
    ✓ should not break with | 
    ✓ should not break with \ 
    ✓ should not break with # 
    ✓ should not break with $ 
    ✓ should not break with % 
    ✓ should not break with & 
    ✓ should not break with / 
    ✓ should not break with = 
    ✓ should not break with + 
    ✓ should not break with º 
    ✓ should not break with ª 
    ✓ should not break with ç 
    ✓ should not break with ~ 
    ✓ should not break with ^ 
    ✓ should not break with § 
    ✓ should not break with ± 
    ✓ should not break with @ 
    ✓ should not break with € 
    ✓ should not break with £ 
    ✓ should not break with ‰ 
    ✓ should not break with ¶ 
    ✓ should not break with ✓ 
    ✓ should not break with « 
    ✓ should not break with » 
    ✓ should not break with > 
    ✓ should not break with < 
    ✓ should not break with ≤ 
    ✓ should not break with ≥ 
    ✓ should not break with — 
    ✓ should not break with … 
    ✓ should not break with “ 
    ✓ should not break with ” 
    ✓ should clean also hexadecimal shits 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.