Git Product home page Git Product logo

Comments (3)

fortable1999 avatar fortable1999 commented on July 17, 2024

Original comment by Matt Chaput (Bitbucket: mchaput, GitHub: mchaput).


When using the default parser, because it's based on a formal pyparsing grammar, you need to catch exceptions when parsing user queries, because any deviation from the grammar understood by the parser will raise an exception.

Writing a more lenient parser is a project I hope to get to someday. The whoosh.qparser.SimpleParser}} and whoosh.qparser.DisMaxParserclasses are available, but don't allow access to most query features (like prefixes and specifying fields). Alternatively you could write your own parser to take a string and translate it into a tree ofwhoosh.query.*` objects.

from whoosh.

fortable1999 avatar fortable1999 commented on July 17, 2024

Original comment by Stavros Korokithakis (Bitbucket: Stavros, GitHub: Stavros).


Ah, it would be great if you could, this bug is very egregious in that it's easy for the user to crash the app...

from whoosh.

fortable1999 avatar fortable1999 commented on July 17, 2024

Original comment by Matt Chaput (Bitbucket: mchaput, GitHub: mchaput).


Fixed this in the repo. A colon at the end of a word is now parsed as part of the word. I'll try to make a new release this week, been too busy for weeks :(

from whoosh.

Related Issues (20)

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.