Giter VIP home page Giter VIP logo

booleansearchparser's People

Contributors

keithstric avatar

Watchers

 avatar  avatar

booleansearchparser's Issues

rule property in a token should be an array

When initially parsing a search string. The reported rule for a match may be whitespace. However, the token is actually a term and NOT whitespace. This signifies that this part of the search string was actually matched by 2 rules and the rule for a term was the first match, and rule for whitespace was the second match. This signifies that the rule property should be an array.

Add html tags

Add span tags around terms.
Use a non-breaking space for whitespace.
Add div tags to groupings.

For example:

this AND ("other thing" OR that)

Should provide this html:

<span class="term">this</span>&nbsp;<span class="operator">AND</span>&nbsp;
<div class="grouping">
  <span class="paren">(</span>
  <div class="grouping">
    <span class="quote">"</span>
    <span class="term">other thing</span>
    <span class="quote">"</span>
  </div>
  &nbsp;<span class="operator">OR</span>&nbsp;<span class="term">that</span>
  <span class="paren">)</span>
</div>

phrases are not included in tokens

When a token is an Operator or Possible Operator, it should have the text leading up to the operator. For example:

"this AND that NOT something"

The token for "AND" should have a phrase of "this AND". The token for "NOT" should have a phrase of "that NOT".

Currently, the phrase property of operators is always undefined.

No way to select/deselect rules

There is currently no way to select the rules or validation rules that will be used for the parsing operation. We should be able to define which rules will be used without having to modify the defined rules.

Not sure this is actually a bug per-se. Maybe "selected rules" is redundant since we always have the default rules to fall back on.

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.