Giter Site home page Giter Site logo

Comments (7)

Leu-Gim avatar Leu-Gim commented on May 23, 2024

There still remain many ways to raise an error with that code, so it's better instead of that to add exception handling for SQLite calls: to replace (lines 1348-1350)

      for rowFT in fastRows(db, queryFT,
                    [q,q,$ThreadsPerPage,$c.pageNum,$ThreadsPerPage,q,
                     q,q,$ThreadsPerPage,$c.pageNum,$ThreadsPerPage,q]):

with

      let rows =
            try: getAllRows(db, queryFT,
                    [q,q,$ThreadsPerPage,$c.pageNum,$ThreadsPerPage,q,
                     q,q,$ThreadsPerPage,$c.pageNum,$ThreadsPerPage,q])
            except: @[]
      for rowFT in rows:

from nimforum.

markprocess avatar markprocess commented on May 23, 2024

@Leu-Gim can you reproduce this in the current deployment? I was unable to. Regards, Mark. cc @dom96

from nimforum.

Leu-Gim avatar Leu-Gim commented on May 23, 2024

After transition to Karax (the new forum) - don't work any more at all, as I see,
and "-someword" is treated as just "someword".

If it worked, the issue would not be visible to users, I think,
because results are fetched via ajax,
via subrequests to /search.json?q=...,
and that exception would raise in that request,
and at client side there's a check for HTTP status of the ajax request prior to processing results.

from nimforum.

Leu-Gim avatar Leu-Gim commented on May 23, 2024

Say "-nick" returns results for "nick"...

from nimforum.

Leu-Gim avatar Leu-Gim commented on May 23, 2024

Oh, Forum has been moved to SQLite's "Enhanced Query Syntax" (https://sqlite.org/fts3.html) now, as I see - AND, OR and parrentheses work. Then NOT should work instead of -.

from nimforum.

Leu-Gim avatar Leu-Gim commented on May 23, 2024

Yes, NOT does work too. An example query with all three operators and () for test: "(csp AND oberon) OR (actionscript NOT mtasc)" (picked for obviousness).

Queries with just negation (NOT word) still fail, and the server doesn't work then for a couple of seconds. So the issue is the same, with just NOT instead of -. And solution is the same.

from nimforum.

markprocess avatar markprocess commented on May 23, 2024

@Leu-Gim Thanks - I will study your comments soon. Mark.

from nimforum.

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.